Skip to content

Commit

Permalink
#220 CollectionTest->setUp() now directly persists the root collectio…
Browse files Browse the repository at this point in the history
…n; this prevents some tests from throwing Doctrine exceptions due to the CollectionRole->rootCollection relationship currently not being set to cascade persist
  • Loading branch information
extracts committed Feb 17, 2022
1 parent cc5af37 commit a6d7292
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tests/Opus/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public function setUp()

$this->object = $this->roleFixture->addRootCollection();
$this->object->setTheme('dummy');
$this->object->store();

$this->roleFixture->store();
}

Expand Down Expand Up @@ -565,8 +567,6 @@ public function testGetDisplayNameWithIncompatibleRole()

public function testGetVisibleChildren()
{
$this->object->store();

// add two children: one of them (the first child) is invisible
$coll1 = new Collection();
$coll1->setVisible('1');
Expand All @@ -592,8 +592,6 @@ public function testGetVisibleChildren()

public function testHasVisibleChildren()
{
$this->object->store();

$this->assertFalse($this->object->hasVisibleChildren());
$this->assertFalse($this->object->hasChildren());

Expand Down Expand Up @@ -916,8 +914,6 @@ protected function setUpFixtureForMoveTests()
*/
public function testHasVisiblePublishChildren()
{
$this->object->store();

$this->assertFalse($this->object->hasVisiblePublishChildren());
$this->assertFalse($this->object->hasChildren());

Expand Down Expand Up @@ -954,8 +950,6 @@ public function testHasVisiblePublishChildren()

public function testHasVisiblePublishChildrenFalseIfNotVisible()
{
$this->object->store();

$this->assertFalse($this->object->hasVisiblePublishChildren());
$this->assertFalse($this->object->hasChildren());

Expand All @@ -975,8 +969,6 @@ public function testHasVisiblePublishChildrenFalseIfNotVisible()
*/
public function testGetVisiblePublishChildren()
{
$this->object->store();

// add two children: one of them (the first child) is invisible
$coll1 = new Collection();
$coll1->setVisiblePublish('1');
Expand Down

0 comments on commit a6d7292

Please sign in to comment.