Skip to content

Commit

Permalink
Adjust $cascade_delete related tests so that the term stays in all st…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
michalkleiner committed Dec 19, 2019
1 parent f41387f commit ffc6bbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/TaxonomyTermTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,19 +496,19 @@ 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();
Versioned::set_stage(Versioned::DRAFT);
$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
Expand Down

0 comments on commit ffc6bbe

Please sign in to comment.