mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-10-31 18:47:33 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * @link http://www.yiiframework.com/
 | |
|  * @copyright Copyright (c) 2008 Yii Software LLC
 | |
|  * @license http://www.yiiframework.com/license/
 | |
|  */
 | |
| 
 | |
| namespace yiiunit\framework\db\mysql;
 | |
| 
 | |
| use yii\db\mysql\ColumnSchemaBuilder;
 | |
| use yii\db\Schema;
 | |
| 
 | |
| /**
 | |
|  * ColumnSchemaBuilderTest tests ColumnSchemaBuilder for MySQL.
 | |
|  * @group db
 | |
|  * @group mysql
 | |
|  */
 | |
| class ColumnSchemaBuilderTest extends \yiiunit\framework\db\ColumnSchemaBuilderTest
 | |
| {
 | |
|     protected $driverName = 'mysql';
 | |
| 
 | |
|     /**
 | |
|      * @param string $type
 | |
|      * @param int $length
 | |
|      * @return ColumnSchemaBuilder
 | |
|      */
 | |
|     public function getColumnSchemaBuilder($type, $length = null)
 | |
|     {
 | |
|         return new ColumnSchemaBuilder($type, $length, $this->getConnection());
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @return array
 | |
|      */
 | |
|     public function typesProvider()
 | |
|     {
 | |
|         return [
 | |
|             ['integer UNSIGNED', Schema::TYPE_INTEGER, null, [
 | |
|                 ['unsigned'],
 | |
|             ]],
 | |
|             ['integer(10) UNSIGNED', Schema::TYPE_INTEGER, 10, [
 | |
|                 ['unsigned'],
 | |
|             ]],
 | |
|             ['integer(10) COMMENT \'test\'', Schema::TYPE_INTEGER, 10, [
 | |
|                 ['comment', 'test'],
 | |
|             ]],
 | |
|         ];
 | |
|     }
 | |
| }
 | 
