You are here

public function PersistentObjectTest::setUp in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php \Doctrine\Tests\Common\Persistence\PersistentObjectTest::setUp()

File

vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php, line 18

Class

PersistentObjectTest
@group DDC-1448

Namespace

Doctrine\Tests\Common\Persistence

Code

public function setUp() {
  $this->cm = new TestObjectMetadata();
  $this->om = $this
    ->getMock('Doctrine\\Common\\Persistence\\ObjectManager');
  $this->om
    ->expects($this
    ->any())
    ->method('getClassMetadata')
    ->will($this
    ->returnValue($this->cm));
  $this->object = new TestObject();
  PersistentObject::setObjectManager($this->om);
  $this->object
    ->injectObjectManager($this->om, $this->cm);
}