Ejemplo n.º 1
0
 /**
  * @see AttachableEntityInterface::setAttachableEntityManager()
  */
 public function setAttachableEntityManager(AttachableEntityManager $attachableEntityManager)
 {
     if (isset($this->attachableEntityManager)) {
         throw new LogicException('Attachable entity manager is already set');
     }
     $this->attachableEntityManager = $attachableEntityManager->setReferences($this->attachableEntityReferences);
     return $this;
 }
 /**
  * @covers ::removeAttachedEntity()
  */
 public function testRemoveAttachedEntityWithExistentKey()
 {
     $key = 'someKey';
     $this->references[$key] = 'someValue';
     $this->assertTrue($this->attachableEntityManager->removeAttachedEntity($key));
     $this->assertArrayNotHasKey($key, $this->references);
 }