public function CommandTest::testSetCodeWithNonClosureCallable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Command/CommandTest.php \Symfony\Component\Console\Tests\Command\CommandTest::testSetCodeWithNonClosureCallable()
File
- vendor/
symfony/ console/ Tests/ Command/ CommandTest.php, line 289
Class
Namespace
Symfony\Component\Console\Tests\CommandCode
public function testSetCodeWithNonClosureCallable() {
$command = new \TestCommand();
$ret = $command
->setCode(array(
$this,
'callableMethodCommand',
));
$this
->assertEquals($command, $ret, '->setCode() implements a fluent interface');
$tester = new CommandTester($command);
$tester
->execute(array());
$this
->assertEquals('interact called' . PHP_EOL . 'from the code...' . PHP_EOL, $tester
->getDisplay());
}