@@ -17,6 +17,9 @@ discard block |
||
17 | 17 | protected $capturedOutput; |
18 | 18 | protected $logger; |
19 | 19 | |
20 | + /** |
|
21 | + * @return \League\Container\ContainerInterface |
|
22 | + */ |
|
20 | 23 | public function initTestTasksTrait($commandClass = null, $container = null, $input = null) |
21 | 24 | { |
22 | 25 | if (!$container) { |
@@ -47,6 +50,9 @@ discard block |
||
47 | 50 | return $container; |
48 | 51 | } |
49 | 52 | |
53 | + /** |
|
54 | + * @return null|OutputInterface |
|
55 | + */ |
|
50 | 56 | public function capturedOutputStream() |
51 | 57 | { |
52 | 58 | if (!$this->testPrinter) { |
@@ -66,6 +72,9 @@ discard block |
||
66 | 72 | return $this->capturedOutput; |
67 | 73 | } |
68 | 74 | |
75 | + /** |
|
76 | + * @param string $value |
|
77 | + */ |
|
69 | 78 | public function assertOutputContains($value) |
70 | 79 | { |
71 | 80 | $output = $this->accumulate(); |
@@ -73,6 +82,9 @@ discard block |
||
73 | 82 | $this->assertContains($value, $output); |
74 | 83 | } |
75 | 84 | |
85 | + /** |
|
86 | + * @param string $value |
|
87 | + */ |
|
76 | 88 | public function assertOutputNotContains($value) |
77 | 89 | { |
78 | 90 | $output = $this->accumulate(); |
@@ -80,6 +92,9 @@ discard block |
||
80 | 92 | $this->assertNotContains($value, $output); |
81 | 93 | } |
82 | 94 | |
95 | + /** |
|
96 | + * @param string $value |
|
97 | + */ |
|
83 | 98 | public function assertOutputEquals($value) |
84 | 99 | { |
85 | 100 | $output = $this->accumulate(); |
@@ -90,6 +105,7 @@ discard block |
||
90 | 105 | /** |
91 | 106 | * Make our output comparisons more platform-agnostic by converting |
92 | 107 | * CRLF (Windows) or raw CR (confused output) to a LF (unix/Mac). |
108 | + * @param string $output |
|
93 | 109 | */ |
94 | 110 | protected function simplify($output) |
95 | 111 | { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | // variables are present. |
65 | 65 | $task = $this->taskExec('env | wc -l')->interactive(false); |
66 | 66 | $result = $task->run(); |
67 | - $start_count = (int) $result->getMessage(); |
|
67 | + $start_count = (int)$result->getMessage(); |
|
68 | 68 | $this->assertGreaterThan(0, $start_count); |
69 | 69 | |
70 | 70 | // Verify that we get the same amount of environment variables with |
@@ -73,13 +73,13 @@ discard block |
||
73 | 73 | $result = $task->run(); |
74 | 74 | $this->assertEquals( |
75 | 75 | $start_count, |
76 | - (int) $result->getMessage()); |
|
76 | + (int)$result->getMessage()); |
|
77 | 77 | |
78 | 78 | // Now run the same command, but this time add another environment |
79 | 79 | // variable, and see if our count increases by one. |
80 | 80 | $task = $this->taskExec('env | wc -l')->interactive(false); |
81 | 81 | $task->env('FOO', 'BAR'); |
82 | 82 | $result = $task->run(); |
83 | - $this->assertEquals($start_count + 1, (int) $result->getMessage()); |
|
83 | + $this->assertEquals($start_count + 1, (int)$result->getMessage()); |
|
84 | 84 | } |
85 | 85 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | * Create a new temporary directory. |
43 | 43 | * |
44 | 44 | * @param string|bool $basedir Where to store the temporary directory |
45 | - * @return type |
|
45 | + * @return string |
|
46 | 46 | */ |
47 | 47 | public function mktmpdir($basedir = false) |
48 | 48 | { |
@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function mktmpdir($basedir = false) |
48 | 48 | { |
49 | - $tempfile = tempnam($basedir ?: $this->testDir ?: sys_get_temp_dir(),'robo-tests'); |
|
49 | + $tempfile = tempnam($basedir ?: $this->testDir ?: sys_get_temp_dir(), 'robo-tests'); |
|
50 | 50 | unlink($tempfile); |
51 | 51 | mkdir($tempfile); |
52 | 52 | $this->tmpDirs[] = $tempfile; |
@@ -27,8 +27,7 @@ |
||
27 | 27 | foreach ($this->tmpDirs as $tmpDir) { |
28 | 28 | try { |
29 | 29 | $fs->remove($tmpDir); |
30 | - } |
|
31 | - catch (\Exception $e) { |
|
30 | + } catch (\Exception $e) { |
|
32 | 31 | // Ignore problems with removing fixtures. |
33 | 32 | } |
34 | 33 | } |