| 1 | <?php |
||
| 13 | class ExecTest extends \PHPUnit_Framework_TestCase |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @test |
||
| 17 | */ |
||
| 18 | public function commandOnly() |
||
| 19 | { |
||
| 20 | Exec::run('echo test'); |
||
| 21 | |||
| 22 | $this->addToAssertionCount(1); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @test |
||
| 27 | */ |
||
| 28 | public function fullParameters() |
||
| 29 | { |
||
| 30 | Exec::run('echo test', $commandOutput, $returnCode); |
||
| 31 | |||
| 32 | $this->assertEquals(Exec::CODE_CLEAN_EXIT, $returnCode); |
||
| 33 | $this->assertStringStartsWith('test', $commandOutput); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @test |
||
| 38 | * |
||
| 39 | * @expectedException RuntimeException |
||
| 40 | */ |
||
| 41 | public function exception() |
||
| 45 | } |
||
| 46 |