fix fixture dependant unit test
This commit is contained in:
@@ -189,7 +189,7 @@ try {
|
||||
$featureList = array();
|
||||
for($i=0; $i<4; $i++) {
|
||||
$feature = new Thelia\Model\Feature();
|
||||
$feature->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$feature->setVisible(1);
|
||||
$feature->setPosition($i);
|
||||
setI18n($faker, $feature);
|
||||
|
||||
@@ -257,7 +257,7 @@ try {
|
||||
for($i=0; $i<4; $i++) {
|
||||
$folder = new Thelia\Model\Folder();
|
||||
$folder->setParent(0);
|
||||
$folder->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$folder->setVisible(1);
|
||||
$folder->setPosition($i);
|
||||
setI18n($faker, $folder);
|
||||
|
||||
@@ -270,7 +270,7 @@ try {
|
||||
for($j=1; $j<rand(0, 5); $j++) {
|
||||
$subfolder = new Thelia\Model\Folder();
|
||||
$subfolder->setParent($folder->getId());
|
||||
$subfolder->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$subfolder->setVisible(1);
|
||||
$subfolder->setPosition($j);
|
||||
setI18n($faker, $subfolder);
|
||||
|
||||
@@ -283,7 +283,7 @@ try {
|
||||
for($k=0; $k<rand(0, 5); $k++) {
|
||||
$content = new Thelia\Model\Content();
|
||||
$content->addFolder($subfolder);
|
||||
$content->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$content->setVisible(1);
|
||||
$content->setPosition($k);
|
||||
setI18n($faker, $content);
|
||||
|
||||
@@ -418,7 +418,7 @@ function createProduct($faker, $category, $position, $template, &$productIdList)
|
||||
$product = new Thelia\Model\Product();
|
||||
$product->setRef($category->getId() . '_' . $position . '_' . $faker->randomNumber(8));
|
||||
$product->addCategory($category);
|
||||
$product->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$product->setVisible(1);
|
||||
$product->setPosition($position);
|
||||
$product->setTaxRuleId(1);
|
||||
$product->setTemplate($template);
|
||||
@@ -440,7 +440,7 @@ function createCategory($faker, $parent, $position, &$categoryIdList, $contentId
|
||||
{
|
||||
$category = new Thelia\Model\Category();
|
||||
$category->setParent($parent);
|
||||
$category->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$category->setVisible(1);
|
||||
$category->setPosition($position);
|
||||
setI18n($faker, $category);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user