tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php 1 location
|
@@ 102-120 (lines=19) @@
|
| 99 |
|
)); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
public function testGeneratesTypeDeclarationForStrings() |
| 103 |
|
{ |
| 104 |
|
self::assertEquals( |
| 105 |
|
'CHAR(10)', |
| 106 |
|
$this->_platform->getVarcharTypeDeclarationSQL( |
| 107 |
|
array('length' => 10, 'fixed' => true) |
| 108 |
|
)); |
| 109 |
|
self::assertEquals( |
| 110 |
|
'VARCHAR(50)', |
| 111 |
|
$this->_platform->getVarcharTypeDeclarationSQL(array('length' => 50)), |
| 112 |
|
'Variable string declaration is not correct' |
| 113 |
|
); |
| 114 |
|
self::assertEquals( |
| 115 |
|
'VARCHAR(255)', |
| 116 |
|
$this->_platform->getVarcharTypeDeclarationSQL(array()), |
| 117 |
|
'Long string declaration is not correct' |
| 118 |
|
); |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
public function testPrefersIdentityColumns() |
| 122 |
|
{ |
| 123 |
|
self::assertTrue($this->_platform->prefersIdentityColumns()); |
tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php 1 location
|
@@ 160-178 (lines=19) @@
|
| 157 |
|
)); |
| 158 |
|
} |
| 159 |
|
|
| 160 |
|
public function testGeneratesTypeDeclarationsForStrings() |
| 161 |
|
{ |
| 162 |
|
self::assertEquals( |
| 163 |
|
'CHAR(10)', |
| 164 |
|
$this->_platform->getVarcharTypeDeclarationSQL( |
| 165 |
|
array('length' => 10, 'fixed' => true) |
| 166 |
|
)); |
| 167 |
|
self::assertEquals( |
| 168 |
|
'VARCHAR2(50)', |
| 169 |
|
$this->_platform->getVarcharTypeDeclarationSQL(array('length' => 50)), |
| 170 |
|
'Variable string declaration is not correct' |
| 171 |
|
); |
| 172 |
|
self::assertEquals( |
| 173 |
|
'VARCHAR2(255)', |
| 174 |
|
$this->_platform->getVarcharTypeDeclarationSQL(array()), |
| 175 |
|
'Long string declaration is not correct' |
| 176 |
|
); |
| 177 |
|
} |
| 178 |
|
|
| 179 |
|
public function testPrefersIdentityColumns() |
| 180 |
|
{ |
| 181 |
|
self::assertFalse($this->_platform->prefersIdentityColumns()); |
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php 1 location
|
@@ 229-247 (lines=19) @@
|
| 226 |
|
); |
| 227 |
|
} |
| 228 |
|
|
| 229 |
|
public function testGeneratesTypeDeclarationForStrings() |
| 230 |
|
{ |
| 231 |
|
self::assertEquals( |
| 232 |
|
'CHAR(10)', |
| 233 |
|
$this->_platform->getVarcharTypeDeclarationSQL( |
| 234 |
|
array('length' => 10, 'fixed' => true)) |
| 235 |
|
); |
| 236 |
|
self::assertEquals( |
| 237 |
|
'VARCHAR(50)', |
| 238 |
|
$this->_platform->getVarcharTypeDeclarationSQL(array('length' => 50)), |
| 239 |
|
'Variable string declaration is not correct' |
| 240 |
|
); |
| 241 |
|
self::assertEquals( |
| 242 |
|
'VARCHAR(255)', |
| 243 |
|
$this->_platform->getVarcharTypeDeclarationSQL(array()), |
| 244 |
|
'Long string declaration is not correct' |
| 245 |
|
); |
| 246 |
|
} |
| 247 |
|
|
| 248 |
|
public function getGenerateIndexSql() |
| 249 |
|
{ |
| 250 |
|
return 'CREATE INDEX my_idx ON mytable (user_name, last_login)'; |
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php 1 location
|
@@ 221-239 (lines=19) @@
|
| 218 |
|
)); |
| 219 |
|
} |
| 220 |
|
|
| 221 |
|
public function testGeneratesTypeDeclarationForStrings() |
| 222 |
|
{ |
| 223 |
|
self::assertEquals( |
| 224 |
|
'CHAR(10)', |
| 225 |
|
$this->_platform->getVarcharTypeDeclarationSQL( |
| 226 |
|
array('length' => 10, 'fixed' => true)) |
| 227 |
|
); |
| 228 |
|
self::assertEquals( |
| 229 |
|
'VARCHAR(50)', |
| 230 |
|
$this->_platform->getVarcharTypeDeclarationSQL(array('length' => 50)), |
| 231 |
|
'Variable string declaration is not correct' |
| 232 |
|
); |
| 233 |
|
self::assertEquals( |
| 234 |
|
'VARCHAR(255)', |
| 235 |
|
$this->_platform->getVarcharTypeDeclarationSQL(array()), |
| 236 |
|
'Long string declaration is not correct' |
| 237 |
|
); |
| 238 |
|
} |
| 239 |
|
|
| 240 |
|
public function getGenerateUniqueIndexSql() |
| 241 |
|
{ |
| 242 |
|
return 'CREATE UNIQUE INDEX index_name ON test (test, test2)'; |