Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function testLockModeIsRespected() |
||
26 | { |
||
27 | $entity = new SomeEntity(); |
||
28 | $this->_em->persist($entity); |
||
29 | $this->_em->flush(); |
||
30 | $this->_em->clear(); |
||
31 | |||
32 | $this->_em->find(SomeEntity::class, 1); |
||
33 | |||
34 | $this->expectException(TransactionRequiredException::class); |
||
35 | $this->_em->find(SomeEntity::class, 1, LockMode::PESSIMISTIC_WRITE); |
||
36 | } |
||
44 |