| @@ 105-133 (lines=29) @@ | ||
| 102 | * @group DBAL-752 |
|
| 103 | * @group DBAL-924 |
|
| 104 | */ |
|
| 105 | public function testGeneratesTypeDeclarationForSmallIntegers() |
|
| 106 | { |
|
| 107 | self::assertEquals( |
|
| 108 | 'SMALLINT', |
|
| 109 | $this->_platform->getSmallIntTypeDeclarationSQL(array()) |
|
| 110 | ); |
|
| 111 | self::assertEquals( |
|
| 112 | 'INTEGER', |
|
| 113 | $this->_platform->getSmallIntTypeDeclarationSQL(array('autoincrement' => true)) |
|
| 114 | ); |
|
| 115 | self::assertEquals( |
|
| 116 | 'INTEGER', |
|
| 117 | $this->_platform->getTinyIntTypeDeclarationSQL(array('autoincrement' => true, 'unsigned' => true)) |
|
| 118 | ); |
|
| 119 | self::assertEquals( |
|
| 120 | 'INTEGER', |
|
| 121 | $this->_platform->getSmallIntTypeDeclarationSQL( |
|
| 122 | array('autoincrement' => true, 'primary' => true)) |
|
| 123 | ); |
|
| 124 | self::assertEquals( |
|
| 125 | 'SMALLINT', |
|
| 126 | $this->_platform->getSmallIntTypeDeclarationSQL(array('unsigned' => false)) |
|
| 127 | ); |
|
| 128 | self::assertEquals( |
|
| 129 | 'SMALLINT UNSIGNED', |
|
| 130 | $this->_platform->getSmallIntTypeDeclarationSQL(array('unsigned' => true)) |
|
| 131 | ); |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * @group DBAL-752 |
|
| 136 | * @group DBAL-924 |
|
| @@ 138-166 (lines=29) @@ | ||
| 135 | * @group DBAL-752 |
|
| 136 | * @group DBAL-924 |
|
| 137 | */ |
|
| 138 | public function testGeneratesTypeDeclarationForMediumIntegers() |
|
| 139 | { |
|
| 140 | self::assertEquals( |
|
| 141 | 'MEDIUMINT', |
|
| 142 | $this->_platform->getMediumIntTypeDeclarationSQL(array()) |
|
| 143 | ); |
|
| 144 | self::assertEquals( |
|
| 145 | 'INTEGER', |
|
| 146 | $this->_platform->getMediumIntTypeDeclarationSQL(array('autoincrement' => true)) |
|
| 147 | ); |
|
| 148 | self::assertEquals( |
|
| 149 | 'INTEGER', |
|
| 150 | $this->_platform->getMediumIntTypeDeclarationSQL(array('autoincrement' => true, 'unsigned' => true)) |
|
| 151 | ); |
|
| 152 | self::assertEquals( |
|
| 153 | 'INTEGER', |
|
| 154 | $this->_platform->getMediumIntTypeDeclarationSQL( |
|
| 155 | array('autoincrement' => true, 'primary' => true)) |
|
| 156 | ); |
|
| 157 | self::assertEquals( |
|
| 158 | 'MEDIUMINT', |
|
| 159 | $this->_platform->getMediumIntTypeDeclarationSQL(array('unsigned' => false)) |
|
| 160 | ); |
|
| 161 | self::assertEquals( |
|
| 162 | 'MEDIUMINT UNSIGNED', |
|
| 163 | $this->_platform->getMediumIntTypeDeclarationSQL(array('unsigned' => true)) |
|
| 164 | ); |
|
| 165 | } |
|
| 166 | ||
| 167 | public function testGeneratesTypeDeclarationForIntegers() |
|
| 168 | { |
|
| 169 | self::assertEquals( |
|
| @@ 167-195 (lines=29) @@ | ||
| 164 | ); |
|
| 165 | } |
|
| 166 | ||
| 167 | public function testGeneratesTypeDeclarationForIntegers() |
|
| 168 | { |
|
| 169 | self::assertEquals( |
|
| 170 | 'INTEGER', |
|
| 171 | $this->_platform->getIntegerTypeDeclarationSQL(array()) |
|
| 172 | ); |
|
| 173 | self::assertEquals( |
|
| 174 | 'INTEGER', |
|
| 175 | $this->_platform->getIntegerTypeDeclarationSQL(array('autoincrement' => true)) |
|
| 176 | ); |
|
| 177 | self::assertEquals( |
|
| 178 | 'INTEGER', |
|
| 179 | $this->_platform->getIntegerTypeDeclarationSQL(array('autoincrement' => true, 'unsigned' => true)) |
|
| 180 | ); |
|
| 181 | self::assertEquals( |
|
| 182 | 'INTEGER', |
|
| 183 | $this->_platform->getIntegerTypeDeclarationSQL( |
|
| 184 | array('autoincrement' => true, 'primary' => true)) |
|
| 185 | ); |
|
| 186 | self::assertEquals( |
|
| 187 | 'INTEGER', |
|
| 188 | $this->_platform->getIntegerTypeDeclarationSQL(array('unsigned' => false)) |
|
| 189 | ); |
|
| 190 | self::assertEquals( |
|
| 191 | 'INTEGER UNSIGNED', |
|
| 192 | $this->_platform->getIntegerTypeDeclarationSQL(array('unsigned' => true)) |
|
| 193 | ); |
|
| 194 | } |
|
| 195 | ||
| 196 | /** |
|
| 197 | * @group DBAL-752 |
|
| 198 | * @group DBAL-924 |
|
| @@ 200-228 (lines=29) @@ | ||
| 197 | * @group DBAL-752 |
|
| 198 | * @group DBAL-924 |
|
| 199 | */ |
|
| 200 | public function testGeneratesTypeDeclarationForBigIntegers() |
|
| 201 | { |
|
| 202 | self::assertEquals( |
|
| 203 | 'BIGINT', |
|
| 204 | $this->_platform->getBigIntTypeDeclarationSQL(array()) |
|
| 205 | ); |
|
| 206 | self::assertEquals( |
|
| 207 | 'INTEGER', |
|
| 208 | $this->_platform->getBigIntTypeDeclarationSQL(array('autoincrement' => true)) |
|
| 209 | ); |
|
| 210 | self::assertEquals( |
|
| 211 | 'INTEGER', |
|
| 212 | $this->_platform->getBigIntTypeDeclarationSQL(array('autoincrement' => true, 'unsigned' => true)) |
|
| 213 | ); |
|
| 214 | self::assertEquals( |
|
| 215 | 'INTEGER', |
|
| 216 | $this->_platform->getBigIntTypeDeclarationSQL( |
|
| 217 | array('autoincrement' => true, 'primary' => true)) |
|
| 218 | ); |
|
| 219 | self::assertEquals( |
|
| 220 | 'BIGINT', |
|
| 221 | $this->_platform->getBigIntTypeDeclarationSQL(array('unsigned' => false)) |
|
| 222 | ); |
|
| 223 | self::assertEquals( |
|
| 224 | 'BIGINT UNSIGNED', |
|
| 225 | $this->_platform->getBigIntTypeDeclarationSQL(array('unsigned' => true)) |
|
| 226 | ); |
|
| 227 | } |
|
| 228 | ||
| 229 | public function testGeneratesTypeDeclarationForStrings() |
|
| 230 | { |
|
| 231 | self::assertEquals( |
|