/**
  * @test
  */
 public function doesNotMatchIfNameAndOccuranceDoNotMatch()
 {
     $descriptor = new PropertyDescriptor(0, 'property', 3);
     $this->assertFalse($descriptor->matches('anotherproperty', 2));
 }
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;
 }