public function testFactoryUpperCaseKeyOk()
 {
     $factory = new PlatformFactory();
     $this->assertInstanceOf('Doctrine\\DBAL\\Platforms\\DB2Platform', $factory->create('DB2'));
     $this->assertInstanceOf('Doctrine\\DBAL\\Platforms\\MySqlPlatform', $factory->create('MYSQL'));
     $this->assertInstanceOf('Doctrine\\DBAL\\Platforms\\OraclePlatform', $factory->create('ORACLE'));
     $this->assertInstanceOf('Doctrine\\DBAL\\Platforms\\PostgreSqlPlatform', $factory->create('POSTGRESQL'));
     $this->assertInstanceOf('Doctrine\\DBAL\\Platforms\\SqlitePlatform', $factory->create('SQLITE'));
     $this->assertInstanceOf('Doctrine\\DBAL\\Platforms\\SQLServer2005Platform', $factory->create('SQLSERVER2005'));
     $this->assertInstanceOf('Doctrine\\DBAL\\Platforms\\SQLServer2008Platform', $factory->create('SQLSERVER2008'));
     $this->assertInstanceOf('Doctrine\\DBAL\\Platforms\\SQLServerPlatform', $factory->create('SQLSERVER'));
 }
Example #2
0
|--------------------------------------------------------------------------
|
| To include new platforms must tell Faker\\PlatformFactory what the new or overriden
| extensions are.
|
|
| Override Built-in Platform (mysql):
|
|   PlatformFactory::registerExtension('mysql','Faker\\Components\\Extension\\Doctrine\\Platforms\\MySqlPlatform');
|
| Include New MyPlatform:
|
| PlatformFactory::registerExtension('myplatform','Faker\\Components\\Extension\\Doctrine\\Platforms\\MyPlatform');
|
*/
PlatformFactory::registerExtension('mysql', 'Faker\\Extension\\Doctrine\\Platforms\\MySqlPlatform');
/*
|--------------------------------------------------------------------------
| Doctrine Column Types
|--------------------------------------------------------------------------
|
| To include new column types use the Faker\\ColumnTypeFactory
| 
|
|  Add new Column types (mysql):
|
|   ColumnTypeFactory::registerExtension('cus_array','Faker\\Components\\Extension\\Doctrine\\Type\\ArrayType');
|
| To use new column types you will need to also create a platform extension, and add the key used above to the initializeDoctrineTypeMappings()
*/
//ColumnTypeFactory::registerExtension('cus_array','Faker\\Components\\Extension\\Doctrine\\Type\\ArrayType');