File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
tests/Doctrine/Tests/ORM/Functional Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,20 @@ public function testThrowsExceptionOnInfiniteEmbeddableNesting($embeddableClassN
243243 ));
244244 }
245245
246+ public function testThrowsExceptionWhenPersistingWithNullOnNonNullableEmbedded ()
247+ {
248+ $ this ->setExpectedException ('Doctrine\DBAL\Exception\NotNullConstraintViolationException ' );
249+
250+ $ event = new DDC3529Event ();
251+ $ event ->name = 'PHP Conference ' ;
252+ $ event ->period = new DDC3529DateInterval (new \DateTime ('2015-01-20 08:00:00 ' ), new \DateTime ('2015-01-23 19:00:00 ' ));
253+
254+ $ this ->_em ->persist ($ event );
255+ $ this ->_em ->flush ();
256+
257+ return $ event ;
258+ }
259+
246260 public function testNoErrorsShouldHappenWhenPersistingAnEntityWithNullableEmbedded ()
247261 {
248262 $ event = new DDC3529Event ();
You can’t perform that action at this time.
0 commit comments