assertNull($strategy->getObjectIdentity('foo')); } public function testGetObjectIdentity() { $strategy = new ObjectIdentityRetrievalStrategy(); $domainObject = new DomainObject(); $objectIdentity = $strategy->getObjectIdentity($domainObject); $this->assertEquals($domainObject->getId(), $objectIdentity->getIdentifier()); $this->assertEquals(get_class($domainObject), $objectIdentity->getType()); } } class DomainObject { public function getId() { return 'foo'; } }