File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -361,20 +361,21 @@ public function testPersistOnRightEmInstance()
361361 $ emOne = $ this ->getMockSqliteEntityManager ($ evm );
362362 $ emTwo = $ this ->getMockSqliteEntityManager ($ evm );
363363
364- $ politicsOne = new Category ();
365- $ politicsOne ->setTitle ('Politics ' );
366- $ newsOne = new News ('Lorem ipsum ' , $ politicsOne );
364+ $ categoryOne = new Category ();
365+ $ categoryOne ->setTitle ('Politics ' );
367366
368- $ politicsTwo = new Category ();
369- $ politicsTwo ->setTitle ('Politics ' );
370- $ newsTwo = new News ('Lorem ipsum ' , $ politicsTwo );
367+ $ categoryTwo = new Category ();
368+ $ categoryTwo ->setTitle ('Politics ' );
371369
372370 // Persist and Flush on different times !
373- $ emOne ->persist ($ newsOne );
371+ $ emOne ->persist ($ categoryOne );
374372
375- $ emTwo ->persist ($ newsTwo );
373+ $ emTwo ->persist ($ categoryTwo );
376374 $ emTwo ->flush ();
377375
378376 $ emOne ->flush ();
377+
378+ $ this ->assertNotNull ($ categoryOne ->getId ());
379+ $ this ->assertNotNull ($ categoryTwo ->getId ());
379380 }
380381}
You can’t perform that action at this time.
0 commit comments