示例#1
0
 /**
  * Check if aggregate is identified by contract and identifier
  *
  * @param Contract   $contract
  * @param Identifier $identifier
  *
  * @return bool
  */
 public function isIdentifiedBy(Contract $contract, Identifier $identifier)
 {
     return $this->contract->equals($contract) && $this->identifier->equals($identifier);
 }
示例#2
0
 public function testIsNotIdentifiedBecauseOfDifferentIdentifier()
 {
     $this->identifier->expects($this->any())->method('equals')->willReturn(false);
     $this->assertFalse($this->aggregate->isIdentifiedBy($this->contract, $this->identifier));
 }