public function PersistentObjectTest::setUp in Plug 7
File
- lib/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Persistence/ PersistentObjectTest.php, line 18
Class
- PersistentObjectTest
- @group DDC-1448
Namespace
Doctrine\Tests\Common\PersistenceCode
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);
}