|
@@ 73-85 (lines=13) @@
|
| 70 |
|
self::assertSame($this->em, $emAware->em); |
| 71 |
|
} |
| 72 |
|
|
| 73 |
|
public function testInjectEntityManagerInFetchedInstance() |
| 74 |
|
{ |
| 75 |
|
/* @var $emAware DDC2231EntityManagerAwareEntity */ |
| 76 |
|
$emAware = $this->em->find( |
| 77 |
|
DDC2231EntityManagerAwareEntity::class, |
| 78 |
|
$this->persistedEntityManagerAwareEntity->id |
| 79 |
|
); |
| 80 |
|
|
| 81 |
|
self::assertInstanceOf(DDC2231EntityManagerAwareEntity::class, $emAware); |
| 82 |
|
self::assertInstanceOf(EntityManagerAware::class, $emAware); |
| 83 |
|
self::assertNotInstanceOf(GhostObjectInterface::class, $emAware); |
| 84 |
|
self::assertSame($this->em, $emAware->em); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
public function testInjectObjectManagerInProxyIfInitializedInUow() |
| 88 |
|
{ |
|
@@ 106-118 (lines=13) @@
|
| 103 |
|
self::assertSame($this->em, $omAware->om); |
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
public function testInjectObjectManagerInFetchedInstance() |
| 107 |
|
{ |
| 108 |
|
/* @var $omAware DDC2231ObjectManagerAwareEntity */ |
| 109 |
|
$omAware = $this->em->find( |
| 110 |
|
DDC2231ObjectManagerAwareEntity::class, |
| 111 |
|
$this->persistedObjectManagerAwareEntity->id |
| 112 |
|
); |
| 113 |
|
|
| 114 |
|
self::assertInstanceOf(DDC2231ObjectManagerAwareEntity::class, $omAware); |
| 115 |
|
self::assertInstanceOf(ObjectManagerAware::class, $omAware); |
| 116 |
|
self::assertNotInstanceOf(GhostObjectInterface::class, $omAware); |
| 117 |
|
self::assertSame($this->em, $omAware->om); |
| 118 |
|
} |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
|