Merge branch 'master' of https://github.com/thelia/thelia
This commit is contained in:
@@ -410,6 +410,11 @@ abstract class BaseLoop
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param LoopResult $loopResult
|
||||
*
|
||||
* @return LoopResult
|
||||
*/
|
||||
abstract public function parseResults(LoopResult $loopResult);
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,6 +53,13 @@ class CategoryTest extends BaseLoopTestor
|
||||
public function testSearchById()
|
||||
{
|
||||
$category = CategoryQuery::create()->findOne();
|
||||
if(null === $category) {
|
||||
$category = new \Thelia\Model\Category();
|
||||
$category->setParent(0);
|
||||
$category->setVisible(1);
|
||||
$category->setTitle('foo');
|
||||
$category->save();
|
||||
}
|
||||
|
||||
$this->baseTestSearchById($category->getId());
|
||||
}
|
||||
|
||||
@@ -53,6 +53,13 @@ class ContentTest extends BaseLoopTestor
|
||||
public function testSearchById()
|
||||
{
|
||||
$content = ContentQuery::create()->findOne();
|
||||
if(null === $content) {
|
||||
$content = new \Thelia\Model\Content();
|
||||
$content->setDefaultFolder(0);
|
||||
$content->setVisible(1);
|
||||
$content->setTitle('foo');
|
||||
$content->save();
|
||||
}
|
||||
|
||||
$this->baseTestSearchById($content->getId());
|
||||
}
|
||||
|
||||
@@ -53,6 +53,13 @@ class FolderTest extends BaseLoopTestor
|
||||
public function testSearchById()
|
||||
{
|
||||
$folder = FolderQuery::create()->findOne();
|
||||
if(null === $folder) {
|
||||
$folder = new \Thelia\Model\Folder();
|
||||
$folder->setParent(0);
|
||||
$folder->setVisible(1);
|
||||
$folder->setTitle('foo');
|
||||
$folder->save();
|
||||
}
|
||||
|
||||
$this->baseTestSearchById($folder->getId());
|
||||
}
|
||||
|
||||
@@ -54,6 +54,13 @@ class ProductTest extends BaseLoopTestor
|
||||
public function testSearchById()
|
||||
{
|
||||
$product = ProductQuery::create()->orderById(Criteria::ASC)->findOne();
|
||||
if(null === $product) {
|
||||
$product = new \Thelia\Model\Product();
|
||||
$product->setDefaultCategory(0);
|
||||
$product->setVisible(1);
|
||||
$product->setTitle('foo');
|
||||
$product->save();
|
||||
}
|
||||
|
||||
$this->baseTestSearchById($product->getId());
|
||||
}
|
||||
|
||||
@@ -53,6 +53,11 @@ class TaxRuleTest extends BaseLoopTestor
|
||||
public function testSearchById()
|
||||
{
|
||||
$tr = TaxRuleQuery::create()->findOne();
|
||||
if(null === $tr) {
|
||||
$tr = new \Thelia\Model\TaxRule();
|
||||
$tr->setTitle('foo');
|
||||
$tr->save();
|
||||
}
|
||||
|
||||
$this->baseTestSearchById($tr->getId(), array('force_return' => true));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user