mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 14:28:27 +08:00
Test for bug dbTypecast with empty char #11548
This commit is contained in:

committed by
Alexander Makarov

parent
94d0bd9ae7
commit
515732c7b8
25
tests/framework/db/ColumnSchemaTest.php
Normal file
25
tests/framework/db/ColumnSchemaTest.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @link http://www.yiiframework.com/
|
||||||
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||||
|
* @license http://www.yiiframework.com/license/
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace yiiunit\framework\db;
|
||||||
|
|
||||||
|
|
||||||
|
use yii\db\ColumnSchema;
|
||||||
|
use yii\db\Schema;
|
||||||
|
use yiiunit\TestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ColumnSchemaTest tests ColumnSchema
|
||||||
|
*/
|
||||||
|
class ColumnSchemaTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testDbTypecastWithEmptyCharType()
|
||||||
|
{
|
||||||
|
$columnSchema = new ColumnSchema(['type' => Schema::TYPE_CHAR]);
|
||||||
|
$this->assertSame('', $columnSchema->dbTypecast(''));
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user