Ejemplo n.º 1
0
 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');
 }
Ejemplo n.º 2
0
 /**
  * @expectedException        \LogicException
  * @expectedExceptionMessage Cannot retrieve helper "formatter" because there is no HelperSet defined.
  */
 public function testGetHelperWithoutHelperSet()
 {
     $command = new \TestCommand();
     $command->getHelper('formatter');
 }