@@ 44-58 (lines=15) @@ | ||
41 | * |
|
42 | * @expectedException \Exception |
|
43 | */ |
|
44 | public function testExecuteInvalidRepository() |
|
45 | { |
|
46 | $input = new ArrayInput( |
|
47 | [ |
|
48 | 'hook' => 'pre-commit', |
|
49 | '--configuration' => HMU_PATH_FILES . '/config/valid.json', |
|
50 | '--git-directory' => 'bar/.git' |
|
51 | ] |
|
52 | ); |
|
53 | ||
54 | $output = new DummyOutput(); |
|
55 | $install = new Install(); |
|
56 | $install->setIO(new NullIO()); |
|
57 | $install->run($input, $output); |
|
58 | } |
|
59 | ||
60 | ||
61 | /** |
@@ 22-36 (lines=15) @@ | ||
19 | /** |
|
20 | * Tests Run::run |
|
21 | */ |
|
22 | public function testExecute() |
|
23 | { |
|
24 | $run = new Run(); |
|
25 | $output = new DummyOutput(); |
|
26 | $input = new ArrayInput( |
|
27 | [ |
|
28 | 'hook' => 'pre-push', |
|
29 | '--configuration' => HMU_PATH_FILES . '/config/valid.json', |
|
30 | '--message' => HMU_PATH_FILES . '/git/message/valid.txt' |
|
31 | ] |
|
32 | ); |
|
33 | ||
34 | $run->setIO(new NullIO()); |
|
35 | $run->run($input, $output); |
|
36 | } |
|
37 | } |
|
38 |