1
0
mirror of synced 2025-01-19 06:51:40 +03:00
doctrine2/tests/lib/mocks/Doctrine_EntityManagerMock.php

25 lines
556 B
PHP

<?php
require_once 'lib/mocks/Doctrine_EntityPersisterMock.php';
class Doctrine_EntityManagerMock extends Doctrine_EntityManager
{
private $_persisterMock;
/**
* Enter description here...
*
* @param unknown_type $entityName
* @override
*/
public function getEntityPersister($entityName)
{
if ( ! $this->_persisterMock) {
$this->_persisterMock = new Doctrine_EntityPersisterMock($this, $this->getClassMetadata($entityName));
}
return $this->_persisterMock;
}
}
?>