public function testAdd() { $descriptor = new Descriptor(); $descriptor->setManager($this->manager); $descriptor->load(new \ReflectionClass('ClassF')); $this->manager->add($descriptor); $this->assertEquals($descriptor, $this->manager->describe('ClassF')); }
/** * @return boolean */ public function isShared() { if (!$this->isShared) { return false; } if ($this->parent && !$this->parent->isShared()) { return false; } if (is_array($this->interfaces)) { /** @var $interface Descriptor */ foreach ($this->interfaces as $interface) { if ($interface->getName() === $this->getName()) { continue; } if (!$interface->isShared()) { return false; } } } return true; }
/** * @expectedException RuntimeException */ public function testResolveArgumentValueException() { $reflectionClass = new ReflectionClass('ClassA'); $this->descriptor->load($reflectionClass); }