fix tests
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user