From 029c97c47fce4bd09fd586ed81105277d86b7668 Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Mon, 16 Dec 2013 11:38:57 +0100 Subject: [PATCH] new checking in folder tests --- core/lib/Thelia/Tests/Action/FolderTest.php | 4 ++++ 1 file changed, 4 insertions(+) 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);