public function testGet() { $application = new Application(); $command = new \TestCommand(); $command->setApplication($application); $formatterHelper = new FormatterHelper(); $this->assertEquals($formatterHelper->getName(), $command->getHelper('formatter')->getName(), '->__get() returns the correct helper'); }
/** * @expectedException \LogicException * @expectedExceptionMessage Cannot retrieve helper "formatter" because there is no HelperSet defined. */ public function testGetHelperWithoutHelperSet() { $command = new \TestCommand(); $command->getHelper('formatter'); }