From f434924e484fc3f86bb667cc8de9e03f52e1143e Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Thu, 19 Dec 2013 15:46:03 +0100 Subject: [PATCH] fix getPosition folder test --- core/lib/Thelia/Tests/Action/FolderTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);