public function testLoadedCommandRuns() { $this->markTestSkipped('The ' . __CLASS__ . ' Symfony ... Console App ... so difficult to extend and test :['); $consoleApp = new Console(); $consoleApp->setAutoExit(false); $tester = new ApplicationTester($consoleApp); $tester->run(array('command' => 'test:command', 'name' => 'Skip', '--skip-app-path' => './tests/fixtures/app')); $this->assertContains('Nice name you got there, Skip.', $tester->getDisplay()); }
protected function setUp() { $app = new Console(); $di = new \Pimple(); // insert test service we want to ensure is set $dep_service = Phake::mock('Skip\\Tests\\Dummy\\TestModel'); $di['test'] = $dep_service; $this->dep_service = $dep_service; // insert di to be used instead of console creating its own $app->setApp($di); // configure console as normal with a json config (take a look at if this test needs chaning!) $app->configure('./tests/config/console.json'); $app->setAutoExit(false); $this->tester = new ApplicationTester($app); }