Exemplo n.º 1
0
 /**
  * Sets a method.
  *
  * @param Stagehand_PHP_Class_Method $method
  */
 public function setMethod(Stagehand_PHP_Class_Method $method)
 {
     $this->_methods[$method->getName()] = $method;
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function createAnAbstractMethod()
 {
     $name = 'getFoo';
     $method = new Stagehand_PHP_Class_Method($name);
     $method->setCode('return 1;');
     $this->assertEquals($method->getName(), $name);
     $this->assertFalse($method->isAbstract());
     $method->defineAbstract();
     $this->assertTrue($method->isAbstract());
 }