fixed test break

This commit is contained in:
Carsten Brandt
2014-06-26 01:35:56 +02:00
parent 739f5fda48
commit 574f67feff
3 changed files with 4 additions and 2 deletions

View File

@ -93,6 +93,7 @@ class ColumnSchema extends Object
return $value;
}
switch ($this->phpType) {
case 'resource':
case 'string':
return is_resource($value) ? $value : (string) $value;
case 'integer':

View File

@ -49,6 +49,7 @@ class Schema extends \yii\db\Schema
'varchar' => self::TYPE_STRING,
'string' => self::TYPE_STRING,
'char' => self::TYPE_STRING,
'blob' => self::TYPE_BINARY,
'datetime' => self::TYPE_DATETIME,
'year' => self::TYPE_DATE,
'date' => self::TYPE_DATE,

View File

@ -192,9 +192,9 @@ class SchemaTest extends DatabaseTestCase
'defaultValue' => 1.23,
],
'blob_col' => [
'type' => 'string',
'type' => 'binary',
'dbType' => 'blob',
'phpType' => 'string',
'phpType' => 'resource',
'allowNull' => true,
'autoIncrement' => false,
'enumValues' => null,