Ejemplo n.º 1
0
 /**
  * @return Code
  */
 public function getCode()
 {
     if ($this->code === null) {
         $this->code = Factory::createCode($this->getReflection());
     }
     return $this->code;
 }
Ejemplo n.º 2
0
 public function testCreateCode()
 {
     $code = Factory::createCode();
     $this->assertInstanceOf('Runkit\\Code', $code);
     $reflection = new ReflectionFunction('testFunctionForFactory');
     $code = Factory::createCode($reflection);
     $this->assertInstanceOf('Runkit\\Code', $code);
 }