예제 #1
0
 public function testGetCommand()
 {
     $cmd = new Command('foo');
     $helperset = new HelperSet();
     $helperset->setCommand($cmd);
     $this->assertEquals($cmd, $helperset->getCommand(), '->getCommand() retrieves stored command');
 }
 protected function setUp()
 {
     parent::setUp();
     $this->application = static::getMock(Application::class);
     $this->sut = $this->getSut();
     $command = static::getMockBuilder(Command::class)->disableOriginalConstructor()->getMock();
     $command->expects(static::any())->method('getApplication')->willReturn($this->application);
     $command->expects(static::any())->method('getName')->willReturn('mock command');
     $helperSet = new HelperSet();
     $helperSet->setCommand($command);
     $this->sut->setHelperSet($helperSet);
     $this->application->setHelperSet($helperSet);
 }