Make properties cascade=remove for Character and Module

This commit is contained in:
Austen McDonald
2016-09-16 05:26:19 +00:00
parent 1294722dbd
commit 4d61bbd348
6 changed files with 20 additions and 10 deletions
+10
View File
@@ -67,5 +67,15 @@ class ModuleTest extends CoreModelTestCase
->getQuery()->getSingleScalarResult());
$this->assertSame(6, $total);
// test cascading removes
$module->delete($em);
$total = intval($em->createQueryBuilder()
->from(ModuleProperty::class, "u")
->select("COUNT(u.propertyName)")
->getQuery()->getSingleScalarResult());
$this->assertSame(0, $total);
}
}