fix fixture dependant unit test

This commit is contained in:
Etienne Roudeix
2013-09-16 16:46:12 +02:00
parent 361e9e1126
commit bf3bc02f8b

View File

@@ -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);