diff --git a/core/lib/Thelia/Tests/Action/FolderTest.php b/core/lib/Thelia/Tests/Action/FolderTest.php index fbe4e0e1a..7be726e4a 100644 --- a/core/lib/Thelia/Tests/Action/FolderTest.php +++ b/core/lib/Thelia/Tests/Action/FolderTest.php @@ -207,6 +207,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);