/** * @covers phpDocumentor\Descriptor\ClassDescriptor::setProperties * @covers phpDocumentor\Descriptor\ClassDescriptor::getProperties */ public function testSettingAndGettingProperties() { $this->assertInstanceOf('phpDocumentor\\Descriptor\\Collection', $this->fixture->getProperties()); $mock = m::mock('phpDocumentor\\Descriptor\\Collection'); $this->fixture->setProperties($mock); $this->assertSame($mock, $this->fixture->getProperties()); }
/** * @param string $name The name of the current property. * * @return PropertyDescriptor */ protected function whenFixtureHasPropertyInParentClassWithSameName($name) { $result = new PropertyDescriptor(); $result->setName($name); $parent = new ClassDescriptor(); $parent->getProperties()->set($name, $result); $class = new ClassDescriptor(); $class->setParent($parent); $this->fixture->setParent($class); return $result; }