| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  | use Robo\Robo; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  | class RunnerTest extends \Codeception\TestCase\Test | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |      * @var \Robo\Runner | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |     private $runner; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |      * @var \CodeGuy | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |     protected $guy; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |     public function _before() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |         $this->runner = new \Robo\Runner('\Robo\RoboFileFixture'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |     public function testThrowsExceptionWhenNoContainerAvailable() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |         \PHPUnit_Framework_TestCase::setExpectedExceptionRegExp( | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |             '\RuntimeException', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |             '/container is not initialized yet.*/' | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |         Robo::unsetContainer(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |         Robo::getContainer(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |     public function testRunnerNoSuchCommand() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |         $argv = ['placeholder', 'no-such-command']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |         $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |         $this->guy->seeInOutput('Command "no-such-command" is not defined.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |     public function testRunnerList() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |         $argv = ['placeholder', 'list']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |         $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |         $this->guy->seeInOutput('test:array-args'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |     public function testRunnerTryArgs() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |         $argv = ['placeholder', 'test:array-args', 'a', 'b', 'c']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |         $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |         $expected = <<<EOT | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  | >  The parameters passed are: | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  | array ( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |   0 => 'a', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |   1 => 'b', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |   2 => 'c', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  | ) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  | EOT; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |         $this->guy->seeOutputEquals($expected); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |     public function testSymfonyStyle() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |         $argv = ['placeholder', 'test:symfony-style']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |         $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |         $this->guy->seeInOutput('Some text in section one.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 68 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 69 |  |  |     public function testSymfony() | 
            
                                                                        
                            
            
                                    
            
            
                | 70 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 71 |  |  |         $argv = ['placeholder', 'test:symfony', 'a', 'b', 'c', '--foo=bar', '--foo=baz', '--foo=boz']; | 
            
                                                                        
                            
            
                                    
            
            
                | 72 |  |  |         $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                        
                            
            
                                    
            
            
                | 73 |  |  |         $expected = <<<EOT | 
            
                                                                        
                            
            
                                    
            
            
                | 74 |  |  | >  The parameters passed are: | 
            
                                                                        
                            
            
                                    
            
            
                | 75 |  |  | array ( | 
            
                                                                        
                            
            
                                    
            
            
                | 76 |  |  |   0 => 'a', | 
            
                                                                        
                            
            
                                    
            
            
                | 77 |  |  |   1 => 'b', | 
            
                                                                        
                            
            
                                    
            
            
                | 78 |  |  |   2 => 'c', | 
            
                                                                        
                            
            
                                    
            
            
                | 79 |  |  | ) | 
            
                                                                        
                            
            
                                    
            
            
                | 80 |  |  | >  The options passed via --foo are: | 
            
                                                                        
                            
            
                                    
            
            
                | 81 |  |  | array ( | 
            
                                                                        
                            
            
                                    
            
            
                | 82 |  |  |   0 => 'bar', | 
            
                                                                        
                            
            
                                    
            
            
                | 83 |  |  |   1 => 'baz', | 
            
                                                                        
                            
            
                                    
            
            
                | 84 |  |  |   2 => 'boz', | 
            
                                                                        
                            
            
                                    
            
            
                | 85 |  |  | ) | 
            
                                                                        
                            
            
                                    
            
            
                | 86 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 87 |  |  | EOT; | 
            
                                                                        
                            
            
                                    
            
            
                | 88 |  |  |         $this->guy->seeOutputEquals($expected); | 
            
                                                                        
                            
            
                                    
            
            
                | 89 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 90 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 91 |  | View Code Duplication |     public function testCommandEventHook() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 92 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 93 |  |  |         $argv = ['placeholder', 'test:command-event']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 94 |  |  |         $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 95 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 96 |  |  |         $expected = <<<EOT | 
            
                                                                                                            
                            
            
                                    
            
            
                | 97 |  |  |  This is the command-event hook for the test:command-event command. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 98 |  |  |  This is the main method for the test:command-event command. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 99 |  |  |  This is the post-command hook for the test:command-event command. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 100 |  |  | EOT; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 101 |  |  |         $this->guy->seeInOutput($expected); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 102 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 103 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 104 |  | View Code Duplication |     public function testCustomEventHook() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 105 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 106 |  |  |         $argv = ['placeholder', 'test:custom-event']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 107 |  |  |         $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 108 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 109 |  |  |         $expected = 'one,two'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 110 |  |  |         $this->guy->seeInOutput($expected); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 111 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 112 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 113 |  |  |     public function testRoboStaticRunMethod() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 114 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 115 |  |  |         $argv = ['placeholder', 'test:symfony-style']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 116 |  |  |         $commandFiles = ['\Robo\RoboFileFixture']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 117 |  |  |         Robo::run($argv, $commandFiles, 'MyApp', '1.2.3', $this->guy->capturedOutputStream()); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 118 |  |  |         $this->guy->seeInOutput('Some text in section one.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 119 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 120 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 121 |  | View Code Duplication |     public function testDeploy() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 122 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 123 |  |  |         $argv = ['placeholder', 'test:deploy', '--simulate']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 124 |  |  |         $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 125 |  |  |         $this->guy->seeInOutput('[Simulator] Simulating Remote\\Ssh(\'mysite.com\', null)'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 126 |  |  |         $this->guy->seeInOutput('[Simulator] Running ssh mysite.com \'cd "/var/www/somesite" && git pull\''); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 127 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 128 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 129 |  | View Code Duplication |     public function testRunnerTryError() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 130 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 131 |  |  |         $argv = ['placeholder', 'test:error']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 132 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 133 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 134 |  |  |         $this->guy->seeInOutput('[Exec] Running ls xyzzy'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 135 |  |  |         $this->assertTrue($result > 0); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 136 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 137 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 138 |  | View Code Duplication |     public function testRunnerTrySimulatedError() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 139 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 140 |  |  |         $argv = ['placeholder', 'test:error', '--simulate']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 141 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 142 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 143 |  |  |         $this->guy->seeInOutput('Simulating Exec'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 144 |  |  |         $this->assertEquals(0, $result); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 145 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 146 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 147 |  | View Code Duplication |     public function testRunnerTryException() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 148 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 149 |  |  |         $argv = ['placeholder', 'test:exception', '--task']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 150 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 151 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 152 |  |  |         $this->guy->seeInOutput('Task failed with an exception'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 153 |  |  |         $this->assertEquals(1, $result); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 154 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 155 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 156 |  |  |     public function testInitCommand() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 157 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 158 |  |  |         $container = \Robo\Robo::getContainer(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 159 |  |  |         $app = $container->get('application'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 160 |  |  |         $app->addInitRoboFileCommand(getcwd() . '/testRoboFile.php', 'RoboTestClass'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 161 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 162 |  |  |         $argv = ['placeholder', 'init']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 163 |  |  |         $status = $this->runner->run($argv, $this->guy->capturedOutputStream(), $app); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 164 |  |  |         $this->guy->seeInOutput('testRoboFile.php will be created in the current directory'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 165 |  |  |         $this->assertEquals(0, $status); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 166 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 167 |  |  |         $this->assertTrue(file_exists('testRoboFile.php')); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 168 |  |  |         $commandContents = file_get_contents('testRoboFile.php'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 169 |  |  |         unlink('testRoboFile.php'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 170 |  |  |         $this->assertContains('class RoboTestClass', $commandContents); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 171 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 172 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 173 |  | View Code Duplication |     public function testTasksStopOnFail() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 174 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 175 |  |  |         $argv = ['placeholder', 'test:stop-on-fail']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 176 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 177 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 178 |  |  |         $this->guy->seeInOutput('['); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 179 |  |  |         $this->assertTrue($result > 0); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 180 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 181 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 182 |  | View Code Duplication |     public function testInvalidRoboDirectory() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 183 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 184 |  |  |         $runnerWithNoRoboFile = new \Robo\Runner(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 185 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 186 |  |  |         $argv = ['placeholder', 'no-such-command', '-f', 'no-such-directory']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 187 |  |  |         $result = $runnerWithNoRoboFile->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 188 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 189 |  |  |         $this->guy->seeInOutput('Path `no-such-directory` is invalid; please provide a valid absolute path to the Robofile to load.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 190 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 191 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 192 |  | View Code Duplication |     public function testUnloadableRoboFile() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 193 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 194 |  |  |         $runnerWithNoRoboFile = new \Robo\Runner(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 195 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 196 |  |  |         $argv = ['placeholder', 'help', 'test:custom-event', '-f', dirname(__DIR__) . '/src/RoboFileFixture.php']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 197 |  |  |         $result = $runnerWithNoRoboFile->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 198 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 199 |  |  |         // We cannot load RoboFileFixture.php via -f / --load-from because | 
            
                                                                                                            
                            
            
                                    
            
            
                | 200 |  |  |         // it has a namespace, and --load-from does not support that. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 201 |  |  |         $this->guy->seeInOutput('Class RoboFileFixture was not loaded'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 202 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 203 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 204 |  | View Code Duplication |     public function testRunnerQuietOutput() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 205 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 206 |  |  |         $argv = ['placeholder', 'test:verbosity', '--quiet']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 207 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 208 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 209 |  |  |         $this->guy->doNotSeeInOutput('This command will print more information at higher verbosity levels'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 210 |  |  |         $this->guy->doNotSeeInOutput('This is a verbose message (-v).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 211 |  |  |         $this->guy->doNotSeeInOutput('This is a very verbose message (-vv).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 212 |  |  |         $this->guy->doNotSeeInOutput('This is a debug message (-vvv).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 213 |  |  |         $this->guy->doNotSeeInOutput(' [warning] This is a warning log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 214 |  |  |         $this->guy->doNotSeeInOutput(' [notice] This is a notice log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 215 |  |  |         $this->guy->doNotSeeInOutput(' [debug] This is a debug log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 216 |  |  |         $this->assertEquals(0, $result); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 217 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 218 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 219 |  | View Code Duplication |     public function testRunnerVerboseOutput() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 220 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 221 |  |  |         $argv = ['placeholder', 'test:verbosity', '-v']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 222 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 223 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 224 |  |  |         $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 225 |  |  |         $this->guy->seeInOutput('This is a verbose message (-v).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 226 |  |  |         $this->guy->doNotSeeInOutput('This is a very verbose message (-vv).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 227 |  |  |         $this->guy->doNotSeeInOutput('This is a debug message (-vvv).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 228 |  |  |         $this->guy->seeInOutput(' [warning] This is a warning log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 229 |  |  |         $this->guy->seeInOutput(' [notice] This is a notice log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 230 |  |  |         $this->guy->doNotSeeInOutput(' [debug] This is a debug log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 231 |  |  |         $this->assertEquals(0, $result); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 232 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 233 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 234 |  | View Code Duplication |     public function testRunnerVeryVerboseOutput() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 235 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 236 |  |  |         $argv = ['placeholder', 'test:verbosity', '-vv']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 237 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 238 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 239 |  |  |         $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 240 |  |  |         $this->guy->seeInOutput('This is a verbose message (-v).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 241 |  |  |         $this->guy->seeInOutput('This is a very verbose message (-vv).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 242 |  |  |         $this->guy->doNotSeeInOutput('This is a debug message (-vvv).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 243 |  |  |         $this->guy->seeInOutput(' [warning] This is a warning log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 244 |  |  |         $this->guy->seeInOutput(' [notice] This is a notice log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 245 |  |  |         $this->guy->doNotSeeInOutput(' [debug] This is a debug log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 246 |  |  |         $this->assertEquals(0, $result); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 247 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 248 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 249 |  | View Code Duplication |     public function testRunnerVerbosityThresholdVerbose() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 250 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 251 |  |  |         $argv = ['placeholder', 'test:verbosity-threshold', '-v']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 252 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 253 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 254 |  |  |         $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 255 |  |  |         $this->guy->seeInOutput("Running echo verbose or higher\nverbose or higher"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 256 |  |  |         $this->guy->doNotSeeInOutput('very verbose or higher'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 257 |  |  |         $this->assertEquals(0, $result); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 258 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 259 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 260 |  | View Code Duplication |     public function testRunnerVerbosityThresholdVeryVerbose() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 261 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 262 |  |  |         $argv = ['placeholder', 'test:verbosity-threshold', '-vv']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 263 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 264 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 265 |  |  |         $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 266 |  |  |         $this->guy->seeInOutput("Running echo verbose or higher\nverbose or higher"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 267 |  |  |         $this->guy->seeInOutput("Running echo very verbose or higher\nvery verbose or higher"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 268 |  |  |         $this->assertEquals(0, $result); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 269 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 270 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 271 |  | View Code Duplication |     public function testRunnerDebugOutput() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 272 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 273 |  |  |         $argv = ['placeholder', 'test:verbosity', '-vvv']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 274 |  |  |         $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 275 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 276 |  |  |         $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 277 |  |  |         $this->guy->seeInOutput('This is a verbose message (-v).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 278 |  |  |         $this->guy->seeInOutput('This is a very verbose message (-vv).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 279 |  |  |         $this->guy->seeInOutput('This is a debug message (-vvv).'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 280 |  |  |         $this->guy->seeInOutput(' [warning] This is a warning log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 281 |  |  |         $this->guy->seeInOutput(' [notice] This is a notice log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 282 |  |  |         $this->guy->seeInOutput(' [debug] This is a debug log message.'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 283 |  |  |         $this->assertEquals(0, $result); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 284 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 285 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 286 |  |  |  | 
            
                        
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.