Commit 574f67fe by Carsten Brandt

fixed test break

parent 739f5fda
...@@ -93,6 +93,7 @@ class ColumnSchema extends Object ...@@ -93,6 +93,7 @@ class ColumnSchema extends Object
return $value; return $value;
} }
switch ($this->phpType) { switch ($this->phpType) {
case 'resource':
case 'string': case 'string':
return is_resource($value) ? $value : (string) $value; return is_resource($value) ? $value : (string) $value;
case 'integer': case 'integer':
......
...@@ -49,6 +49,7 @@ class Schema extends \yii\db\Schema ...@@ -49,6 +49,7 @@ class Schema extends \yii\db\Schema
'varchar' => self::TYPE_STRING, 'varchar' => self::TYPE_STRING,
'string' => self::TYPE_STRING, 'string' => self::TYPE_STRING,
'char' => self::TYPE_STRING, 'char' => self::TYPE_STRING,
'blob' => self::TYPE_BINARY,
'datetime' => self::TYPE_DATETIME, 'datetime' => self::TYPE_DATETIME,
'year' => self::TYPE_DATE, 'year' => self::TYPE_DATE,
'date' => self::TYPE_DATE, 'date' => self::TYPE_DATE,
......
...@@ -192,9 +192,9 @@ class SchemaTest extends DatabaseTestCase ...@@ -192,9 +192,9 @@ class SchemaTest extends DatabaseTestCase
'defaultValue' => 1.23, 'defaultValue' => 1.23,
], ],
'blob_col' => [ 'blob_col' => [
'type' => 'string', 'type' => 'binary',
'dbType' => 'blob', 'dbType' => 'blob',
'phpType' => 'string', 'phpType' => 'resource',
'allowNull' => true, 'allowNull' => true,
'autoIncrement' => false, 'autoIncrement' => false,
'enumValues' => null, 'enumValues' => null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment