| 1 | <?php |
||
| 6 | class FacadeTest extends \Codeception\Test\Unit |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var \Nexus\Shell\ShellFacade |
||
| 10 | */ |
||
| 11 | private $facade; |
||
| 12 | |||
| 13 | protected function _before() |
||
| 14 | { |
||
| 15 | $this->facade = Locator::getInstance()->shell()->facade(); |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @group Nexus |
||
| 20 | * @group Shell |
||
| 21 | * @group Facade |
||
| 22 | * @group Integration |
||
| 23 | */ |
||
| 24 | public function testRunCommand() |
||
| 25 | { |
||
| 26 | $command = sprintf( |
||
| 27 | 'cat %s/testDir/findme', |
||
| 28 | __DIR__ |
||
| 29 | ); |
||
| 30 | |||
| 31 | $this->assertEquals( |
||
| 32 | 'test', |
||
| 33 | $this->facade->runCommand($command) |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | } |