/**
  * @test
  */
 public function returnsNameSetViaConstructor()
 {
     $descriptor = new PropertyDescriptor(0, 'property');
     $this->assertEquals('property', $descriptor->getName());
 }
Example #2
0
 /**
  * Returns whether this candidate matches the given propertydescriptor
  *
  * @param PropertyDescriptor $propertyDescriptor
  * @return bool
  */
 public function matches(PropertyDescriptor $propertyDescriptor) : bool
 {
     $property = $propertyDescriptor->getName();
     $occurance = $propertyDescriptor->getOccurance();
     return $property === $this->property && $occurance === $this->occurance;
 }