コード例 #1
0
 public function satisfies(iRequirement $requirement, iResponsible $responsible)
 {
     $requiredClass = new ReflectionClass($requirement->getClass());
     $givenClass = new ReflectionClass($responsible->getResponsibility());
     return $this->isSatisfiedBy($requiredClass, $givenClass);
 }
コード例 #2
0
 public function add(Responsible $responsible)
 {
     $this->responsibles[$responsible->getResponsibility()] = $responsible;
     return $this;
 }
コード例 #3
0
 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);
 }