public function HelperSetTest::testSetCommand in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Helper/HelperSetTest.php \Symfony\Component\Console\Tests\Helper\HelperSetTest::testSetCommand()
@covers \Symfony\Component\Console\Helper\HelperSet::setCommand
File
- vendor/
symfony/ console/ Tests/ Helper/ HelperSetTest.php, line 88
Class
Namespace
Symfony\Component\Console\Tests\HelperCode
public function testSetCommand() {
$cmd_01 = new Command('foo');
$cmd_02 = new Command('bar');
$helperset = new HelperSet();
$helperset
->setCommand($cmd_01);
$this
->assertEquals($cmd_01, $helperset
->getCommand(), '->setCommand() stores given command');
$helperset = new HelperSet();
$helperset
->setCommand($cmd_01);
$helperset
->setCommand($cmd_02);
$this
->assertEquals($cmd_02, $helperset
->getCommand(), '->setCommand() overwrites stored command with consecutive calls');
}