Skip to content
Permalink
Browse files

Fixed tests

  • Loading branch information...
lorenzo committed Jul 9, 2015
1 parent e726b0d commit 7daa24e64aa7eb310483f13e3b9dfdd900050c2a
@@ -363,9 +363,7 @@ public function baseColumnType($column)
return null;
}
$map = Type::map($type);
if (isset($map[$type])) {
if (Type::map($type)) {
$type = Type::build($type)->getBaseType();
}
return $this->_columns[$column]['baseType'] = $type;
@@ -254,6 +254,7 @@ public function testDescribeTable()
$expected = [
'id' => [
'type' => 'biginteger',
'baseType' => null,
'null' => false,
'unsigned' => false,
'default' => null,
@@ -264,6 +265,7 @@ public function testDescribeTable()
],
'title' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => null,
'length' => 20,
@@ -273,6 +275,7 @@ public function testDescribeTable()
],
'body' => [
'type' => 'text',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -281,6 +284,7 @@ public function testDescribeTable()
],
'author_id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'unsigned' => false,
'default' => null,
@@ -291,6 +295,7 @@ public function testDescribeTable()
],
'published' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -299,6 +304,7 @@ public function testDescribeTable()
],
'allow_comments' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -307,6 +313,7 @@ public function testDescribeTable()
],
'created' => [
'type' => 'datetime',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -277,6 +277,7 @@ public function testDescribeTable()
$expected = [
'id' => [
'type' => 'biginteger',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 20,
@@ -287,6 +288,7 @@ public function testDescribeTable()
],
'title' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => null,
'length' => 20,
@@ -296,6 +298,7 @@ public function testDescribeTable()
],
'body' => [
'type' => 'text',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -304,6 +307,7 @@ public function testDescribeTable()
],
'author_id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 10,
@@ -314,6 +318,7 @@ public function testDescribeTable()
],
'published' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -322,6 +327,7 @@ public function testDescribeTable()
],
'views' => [
'type' => 'integer',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => 5,
@@ -332,6 +338,7 @@ public function testDescribeTable()
],
'created' => [
'type' => 'timestamp',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -277,6 +277,7 @@ public function testDescribeTable()
$expected = [
'id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => null,
@@ -287,6 +288,7 @@ public function testDescribeTable()
],
'title' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => 'testing',
'length' => 20,
@@ -296,6 +298,7 @@ public function testDescribeTable()
],
'body' => [
'type' => 'text',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -304,6 +307,7 @@ public function testDescribeTable()
],
'author_id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 11,
@@ -314,6 +318,7 @@ public function testDescribeTable()
],
'published' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -322,6 +327,7 @@ public function testDescribeTable()
],
'created' => [
'type' => 'datetime',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -283,6 +283,7 @@ public function testDescribeTable()
$expected = [
'id' => [
'type' => 'biginteger',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 19,
@@ -293,6 +294,7 @@ public function testDescribeTable()
],
'title' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => null,
'length' => 20,
@@ -302,6 +304,7 @@ public function testDescribeTable()
],
'body' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => null,
'length' => 1000,
@@ -311,6 +314,7 @@ public function testDescribeTable()
],
'author_id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 10,
@@ -321,6 +325,7 @@ public function testDescribeTable()
],
'published' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -329,6 +334,7 @@ public function testDescribeTable()
],
'views' => [
'type' => 'integer',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => 5,
@@ -339,6 +345,7 @@ public function testDescribeTable()
],
'created' => [
'type' => 'timestamp',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -41,9 +41,19 @@ class TableTest extends TestCase
public $fixtures = ['core.articles_tags', 'core.products', 'core.orders', 'core.tags'];
protected $_map;
public function setUp()
{
$this->_map = Type::map();
parent::setUp();
}
public function tearDown()
{
TableRegistry::clear();
Type::clear();
Type::map($this->_map);
parent::tearDown();
}

0 comments on commit 7daa24e

Please sign in to comment.
You can’t perform that action at this time.