/** * @depends testConstructor */ public function testSettersGetters() { $unitUnderTest = new PropertyMetadata('testProperty'); $this->assertEquals(false, $unitUnderTest->isExpose()); $unitUnderTest->setExpose(true); $this->assertEquals(true, $unitUnderTest->isExpose()); $unitUnderTest->setSerializedName('serialized'); $this->assertEquals('serialized', $unitUnderTest->getSerializedName()); $unitUnderTest->setType('string'); $this->assertEquals('string', $unitUnderTest->getType()); $unitUnderTest->setGroups(array('string', 'test')); $this->assertCount(2, $unitUnderTest->getGroups()); $this->assertEquals(array('string', 'test'), $unitUnderTest->getGroups()); }
/** * @param PropertyMetadata $property * @return bool */ public function shouldSkip(PropertyMetadata $property) { if (!$property->isExpose()) { return true; } foreach ($this->specifications as $specification) { if ($specification->isSatisfiedBy($property)) { return true; } } return false; }