public function testRun() { $application = $this->getMockBuilder('Symfony\\Component\\Console\\Application')->getMock(); $application->expects($this->once())->method('run')->will($this->returnValue(0)); $samurai = new Samurai($application); $this->assertSame(0, $samurai->run()); }