Example #1
0
 public function satisfies(iRequirement $requirement, iResponsible $responsible)
 {
     $requiredClass = new ReflectionClass($requirement->getClass());
     $givenClass = new ReflectionClass($responsible->getResponsibility());
     return $this->isSatisfiedBy($requiredClass, $givenClass);
 }
 function it_shouldnt_satisfy_a_class_with_an_object_of_another_class(Requirement $requirement, Responsible $responsible)
 {
     $requirement->getClass()->willReturn(aClass::class);
     $responsible->getResponsibility()->willReturn(anotherClass::class);
     $this->satisfies($requirement, $responsible)->shouldReturn(false);
 }