diff --git a/core/lib/Thelia/Tests/Action/FolderTest.php b/core/lib/Thelia/Tests/Action/FolderTest.php index 2c30e491c..cbf9a7c1e 100644 --- a/core/lib/Thelia/Tests/Action/FolderTest.php +++ b/core/lib/Thelia/Tests/Action/FolderTest.php @@ -224,7 +224,7 @@ class FolderTest extends TestCaseWithURLToolSetup ->findOne(); if (null === $nextFolder) { - $this->fail('use fixtures before launching test, there is no folder in database'); + $this->fail('use fixtures before launching test, there is not enough folder in database'); } $folder = FolderQuery::create() @@ -232,6 +232,10 @@ class FolderTest extends TestCaseWithURLToolSetup ->filterByParent($nextFolder->getParent()) ->findOne(); + if (null === $folder) { + $this->fail('use fixtures before launching test, there is not enough folder in database'); + } + $newPosition = $folder->getPosition()+1; $event = new UpdatePositionEvent($folder->getId(), UpdatePositionEvent::POSITION_DOWN);