diff --git a/core/lib/Thelia/Model/Map/ConfigTableMap.php b/core/lib/Thelia/Model/Map/ConfigTableMap.php index ebd5d6edf..8208b56fe 100644 --- a/core/lib/Thelia/Model/Map/ConfigTableMap.php +++ b/core/lib/Thelia/Model/Map/ConfigTableMap.php @@ -166,7 +166,7 @@ class ConfigTableMap extends TableMap // columns $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); $this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null); - $this->addColumn('VALUE', 'Value', 'VARCHAR', true, 255, null); + $this->addColumn('VALUE', 'Value', 'LONGVARCHAR', true, null, null); $this->addColumn('SECURED', 'Secured', 'TINYINT', true, null, 1); $this->addColumn('HIDDEN', 'Hidden', 'TINYINT', true, null, 1); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/CategoryTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/CategoryTest.php index ce5f56747..c3fbe56d9 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/CategoryTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/CategoryTest.php @@ -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()); } diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/ContentTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/ContentTest.php index 3a286200a..dbb705b03 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/ContentTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/ContentTest.php @@ -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()); } diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/FolderTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/FolderTest.php index 15ea3968c..a5210839e 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/FolderTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/FolderTest.php @@ -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()); } diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/ProductTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/ProductTest.php index 07e179cbd..e806a6971 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/ProductTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/ProductTest.php @@ -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()); } diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/TaxRuleTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/TaxRuleTest.php index fa24d72ee..7e2da4b26 100644 --- a/core/lib/Thelia/Tests/Core/Template/Loop/TaxRuleTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/TaxRuleTest.php @@ -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)); } diff --git a/install/thelia.sql b/install/thelia.sql index b213c114f..ed27071fb 100755 --- a/install/thelia.sql +++ b/install/thelia.sql @@ -416,7 +416,7 @@ CREATE TABLE `config` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, - `value` VARCHAR(255) NOT NULL, + `value` TEXT NOT NULL, `secured` TINYINT DEFAULT 1 NOT NULL, `hidden` TINYINT DEFAULT 1 NOT NULL, `created_at` DATETIME,