diff --git a/src/Extensions/DataObjectTaxonomiesDataExtension.php b/src/Extensions/DataObjectTaxonomiesDataExtension.php index cdf16a9..be2f02a 100644 --- a/src/Extensions/DataObjectTaxonomiesDataExtension.php +++ b/src/Extensions/DataObjectTaxonomiesDataExtension.php @@ -45,11 +45,6 @@ class DataObjectTaxonomiesDataExtension extends DataExtension 'Tags', ]; - // Delete the joining objects when the owner gets deleted - private static $cascade_deletes = [ - 'Tags', - ]; - // Duplicate the joining objects when the owner gets duplicated private static $cascade_duplicates = [ 'Tags', diff --git a/tests/TaxonomyTermTest.php b/tests/TaxonomyTermTest.php index 6fb0bf6..b789792 100644 --- a/tests/TaxonomyTermTest.php +++ b/tests/TaxonomyTermTest.php @@ -496,9 +496,9 @@ public function testOwnerObjectOwnsTaxonomyTerm() $object1FromLive = OwnerObject::get()->byID($object1->ID); $this->assertNull($object1FromLive, 'object1 doesn\'t exist on Live table after being unpublished'); $rootTerm1FromLive = TaxonomyTerm::get()->byID($rootTerm1->ID); - $this->assertNull( + $this->assertNotNull( $rootTerm1FromLive, - 'rootTerm1 doesn\'t exist on Live table after object1 being unpublished' + 'rootTerm1 still exists on Live after object1 being unpublished' ); $object1->doArchive(); @@ -506,9 +506,9 @@ public function testOwnerObjectOwnsTaxonomyTerm() $object1FromStage = OwnerObject::get()->byID($object1->ID); $this->assertNull($object1FromStage, 'object1 doesn\'t exist on Stage table after being archived'); $rootTerm1FromStage = TaxonomyTerm::get()->byID($rootTerm1->ID); - $this->assertNull( + $this->assertNotNull( $rootTerm1FromStage, - 'rootTerm1 doesn\'t exist on Stage table after object1 being archived' + 'rootTerm1 still exists on Stage after object1 being archived' ); // Restore the orig archived stage