1 | <?php |
||
16 | class EntityManagerMock extends EntityManagerDecorator |
||
17 | { |
||
18 | /** |
||
19 | * @var \Doctrine\ORM\UnitOfWork|null |
||
20 | */ |
||
21 | private $uowMock; |
||
22 | |||
23 | /** |
||
24 | * @var \Doctrine\ORM\Proxy\Factory\ProxyFactory|null |
||
25 | */ |
||
26 | private $proxyFactoryMock; |
||
27 | |||
28 | /** |
||
29 | * @return EntityManagerInterface |
||
30 | */ |
||
31 | public function getWrappedEntityManager() : EntityManagerInterface |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function getUnitOfWork() |
||
43 | |||
44 | /** |
||
45 | * Sets a (mock) UnitOfWork that will be returned when getUnitOfWork() is called. |
||
46 | * |
||
47 | * @param \Doctrine\ORM\UnitOfWork $uow |
||
48 | * |
||
49 | * @return void |
||
50 | */ |
||
51 | public function setUnitOfWork($uow) |
||
55 | |||
56 | /** |
||
57 | * @param \Doctrine\ORM\Proxy\Factory\ProxyFactory $proxyFactory |
||
58 | * |
||
59 | * @return void |
||
60 | */ |
||
61 | public function setProxyFactory($proxyFactory) |
||
65 | |||
66 | /** |
||
67 | * @return \Doctrine\ORM\Proxy\Factory\ProxyFactory |
||
68 | */ |
||
69 | public function getProxyFactory() |
||
73 | |||
74 | /** |
||
75 | * Mock factory method to create an EntityManager. |
||
76 | * |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public static function create($conn, Configuration $config = null, EventManager $eventManager = null) |
||
97 | } |
||
98 |