@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function testTransactionNestingBehaviorWithSavepoints() |
68 | 68 | { |
69 | - if (!$this->_conn->getDatabasePlatform()->supportsSavepoints()) { |
|
69 | + if ( ! $this->_conn->getDatabasePlatform()->supportsSavepoints()) { |
|
70 | 70 | $this->markTestSkipped('This test requires the platform to support savepoints.'); |
71 | 71 | } |
72 | 72 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | public function testTransactionNestingBehaviorCantBeChangedInActiveTransaction() |
107 | 107 | { |
108 | - if (!$this->_conn->getDatabasePlatform()->supportsSavepoints()) { |
|
108 | + if ( ! $this->_conn->getDatabasePlatform()->supportsSavepoints()) { |
|
109 | 109 | $this->markTestSkipped('This test requires the platform to support savepoints.'); |
110 | 110 | } |
111 | 111 |
@@ -141,7 +141,7 @@ |
||
141 | 141 | $options = is_array($url) ? $url : ['url' => $url]; |
142 | 142 | |
143 | 143 | if (isset($options['pdo'])) { |
144 | - if (! extension_loaded('pdo')) { |
|
144 | + if ( ! extension_loaded('pdo')) { |
|
145 | 145 | $this->markTestSkipped('PDO is not installed'); |
146 | 146 | } |
147 | 147 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\DBAL\Schema; |
6 | 6 |
@@ -46,76 +46,76 @@ discard block |
||
46 | 46 | { |
47 | 47 | public function testCompareSame1() |
48 | 48 | { |
49 | - $schema1 = new Schema( array( |
|
49 | + $schema1 = new Schema(array( |
|
50 | 50 | 'bugdb' => new Table('bugdb', |
51 | - array ( |
|
52 | - 'integerfield1' => new Column('integerfield1', Type::getType('integer' ) ), |
|
51 | + array( |
|
52 | + 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
|
53 | 53 | ) |
54 | 54 | ), |
55 | - ) ); |
|
56 | - $schema2 = new Schema( array( |
|
55 | + )); |
|
56 | + $schema2 = new Schema(array( |
|
57 | 57 | 'bugdb' => new Table('bugdb', |
58 | - array ( |
|
59 | - 'integerfield1' => new Column('integerfield1', Type::getType('integer') ), |
|
58 | + array( |
|
59 | + 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
|
60 | 60 | ) |
61 | 61 | ), |
62 | - ) ); |
|
62 | + )); |
|
63 | 63 | |
64 | 64 | $expected = new SchemaDiff(); |
65 | 65 | $expected->fromSchema = $schema1; |
66 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
|
66 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | public function testCompareSame2() |
70 | 70 | { |
71 | - $schema1 = new Schema( array( |
|
71 | + $schema1 = new Schema(array( |
|
72 | 72 | 'bugdb' => new Table('bugdb', |
73 | - array ( |
|
73 | + array( |
|
74 | 74 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
75 | 75 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
76 | 76 | ) |
77 | 77 | ), |
78 | - ) ); |
|
79 | - $schema2 = new Schema( array( |
|
78 | + )); |
|
79 | + $schema2 = new Schema(array( |
|
80 | 80 | 'bugdb' => new Table('bugdb', |
81 | - array ( |
|
81 | + array( |
|
82 | 82 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
83 | 83 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
84 | 84 | ) |
85 | 85 | ), |
86 | - ) ); |
|
86 | + )); |
|
87 | 87 | |
88 | 88 | $expected = new SchemaDiff(); |
89 | 89 | $expected->fromSchema = $schema1; |
90 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
|
90 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | public function testCompareMissingTable() |
94 | 94 | { |
95 | 95 | $schemaConfig = new \Doctrine\DBAL\Schema\SchemaConfig; |
96 | - $table = new Table('bugdb', array ('integerfield1' => new Column('integerfield1', Type::getType('integer')))); |
|
96 | + $table = new Table('bugdb', array('integerfield1' => new Column('integerfield1', Type::getType('integer')))); |
|
97 | 97 | $table->setSchemaConfig($schemaConfig); |
98 | 98 | |
99 | - $schema1 = new Schema( array($table), array(), $schemaConfig ); |
|
100 | - $schema2 = new Schema( array(), array(), $schemaConfig ); |
|
99 | + $schema1 = new Schema(array($table), array(), $schemaConfig); |
|
100 | + $schema2 = new Schema(array(), array(), $schemaConfig); |
|
101 | 101 | |
102 | - $expected = new SchemaDiff( array(), array(), array('bugdb' => $table), $schema1 ); |
|
102 | + $expected = new SchemaDiff(array(), array(), array('bugdb' => $table), $schema1); |
|
103 | 103 | |
104 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
|
104 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | public function testCompareNewTable() |
108 | 108 | { |
109 | 109 | $schemaConfig = new \Doctrine\DBAL\Schema\SchemaConfig; |
110 | - $table = new Table('bugdb', array ('integerfield1' => new Column('integerfield1', Type::getType('integer')))); |
|
110 | + $table = new Table('bugdb', array('integerfield1' => new Column('integerfield1', Type::getType('integer')))); |
|
111 | 111 | $table->setSchemaConfig($schemaConfig); |
112 | 112 | |
113 | - $schema1 = new Schema( array(), array(), $schemaConfig ); |
|
114 | - $schema2 = new Schema( array($table), array(), $schemaConfig ); |
|
113 | + $schema1 = new Schema(array(), array(), $schemaConfig); |
|
114 | + $schema2 = new Schema(array($table), array(), $schemaConfig); |
|
115 | 115 | |
116 | - $expected = new SchemaDiff( array('bugdb' => $table), array(), array(), $schema1 ); |
|
116 | + $expected = new SchemaDiff(array('bugdb' => $table), array(), array(), $schema1); |
|
117 | 117 | |
118 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
|
118 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | public function testCompareOnlyAutoincrementChanged() |
@@ -132,26 +132,26 @@ discard block |
||
132 | 132 | public function testCompareMissingField() |
133 | 133 | { |
134 | 134 | $missingColumn = new Column('integerfield1', Type::getType('integer')); |
135 | - $schema1 = new Schema( array( |
|
135 | + $schema1 = new Schema(array( |
|
136 | 136 | 'bugdb' => new Table('bugdb', |
137 | - array ( |
|
137 | + array( |
|
138 | 138 | 'integerfield1' => $missingColumn, |
139 | 139 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
140 | 140 | ) |
141 | 141 | ), |
142 | - ) ); |
|
143 | - $schema2 = new Schema( array( |
|
142 | + )); |
|
143 | + $schema2 = new Schema(array( |
|
144 | 144 | 'bugdb' => new Table('bugdb', |
145 | - array ( |
|
145 | + array( |
|
146 | 146 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
147 | 147 | ) |
148 | 148 | ), |
149 | - ) ); |
|
149 | + )); |
|
150 | 150 | |
151 | - $expected = new SchemaDiff ( array(), |
|
152 | - array ( |
|
153 | - 'bugdb' => new TableDiff( 'bugdb', array(), array(), |
|
154 | - array ( |
|
151 | + $expected = new SchemaDiff(array(), |
|
152 | + array( |
|
153 | + 'bugdb' => new TableDiff('bugdb', array(), array(), |
|
154 | + array( |
|
155 | 155 | 'integerfield1' => $missingColumn, |
156 | 156 | ) |
157 | 157 | ) |
@@ -160,31 +160,31 @@ discard block |
||
160 | 160 | $expected->fromSchema = $schema1; |
161 | 161 | $expected->changedTables['bugdb']->fromTable = $schema1->getTable('bugdb'); |
162 | 162 | |
163 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
|
163 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | public function testCompareNewField() |
167 | 167 | { |
168 | - $schema1 = new Schema( array( |
|
168 | + $schema1 = new Schema(array( |
|
169 | 169 | 'bugdb' => new Table('bugdb', |
170 | - array ( |
|
170 | + array( |
|
171 | 171 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
172 | 172 | ) |
173 | 173 | ), |
174 | - ) ); |
|
175 | - $schema2 = new Schema( array( |
|
174 | + )); |
|
175 | + $schema2 = new Schema(array( |
|
176 | 176 | 'bugdb' => new Table('bugdb', |
177 | - array ( |
|
177 | + array( |
|
178 | 178 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
179 | 179 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
180 | 180 | ) |
181 | 181 | ), |
182 | - ) ); |
|
182 | + )); |
|
183 | 183 | |
184 | - $expected = new SchemaDiff ( array(), |
|
185 | - array ( |
|
186 | - 'bugdb' => new TableDiff ('bugdb', |
|
187 | - array ( |
|
184 | + $expected = new SchemaDiff(array(), |
|
185 | + array( |
|
186 | + 'bugdb' => new TableDiff('bugdb', |
|
187 | + array( |
|
188 | 188 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
189 | 189 | ) |
190 | 190 | ), |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $expected->fromSchema = $schema1; |
194 | 194 | $expected->changedTables['bugdb']->fromTable = $schema1->getTable('bugdb'); |
195 | 195 | |
196 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
|
196 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | public function testCompareChangedColumns_ChangeType() |
@@ -244,13 +244,13 @@ discard block |
||
244 | 244 | |
245 | 245 | public function testCompareRemovedIndex() |
246 | 246 | { |
247 | - $schema1 = new Schema( array( |
|
247 | + $schema1 = new Schema(array( |
|
248 | 248 | 'bugdb' => new Table('bugdb', |
249 | - array ( |
|
249 | + array( |
|
250 | 250 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
251 | 251 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
252 | 252 | ), |
253 | - array ( |
|
253 | + array( |
|
254 | 254 | 'primary' => new Index('primary', |
255 | 255 | array( |
256 | 256 | 'integerfield1' |
@@ -259,20 +259,20 @@ discard block |
||
259 | 259 | ) |
260 | 260 | ) |
261 | 261 | ), |
262 | - ) ); |
|
263 | - $schema2 = new Schema( array( |
|
262 | + )); |
|
263 | + $schema2 = new Schema(array( |
|
264 | 264 | 'bugdb' => new Table('bugdb', |
265 | - array ( |
|
265 | + array( |
|
266 | 266 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
267 | 267 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
268 | 268 | ) |
269 | 269 | ), |
270 | - ) ); |
|
270 | + )); |
|
271 | 271 | |
272 | - $expected = new SchemaDiff ( array(), |
|
273 | - array ( |
|
274 | - 'bugdb' => new TableDiff( 'bugdb', array(), array(), array(), array(), array(), |
|
275 | - array ( |
|
272 | + $expected = new SchemaDiff(array(), |
|
273 | + array( |
|
274 | + 'bugdb' => new TableDiff('bugdb', array(), array(), array(), array(), array(), |
|
275 | + array( |
|
276 | 276 | 'primary' => new Index('primary', |
277 | 277 | array( |
278 | 278 | 'integerfield1' |
@@ -286,26 +286,26 @@ discard block |
||
286 | 286 | $expected->fromSchema = $schema1; |
287 | 287 | $expected->changedTables['bugdb']->fromTable = $schema1->getTable('bugdb'); |
288 | 288 | |
289 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
|
289 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | public function testCompareNewIndex() |
293 | 293 | { |
294 | - $schema1 = new Schema( array( |
|
294 | + $schema1 = new Schema(array( |
|
295 | 295 | 'bugdb' => new Table('bugdb', |
296 | - array ( |
|
296 | + array( |
|
297 | 297 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
298 | 298 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
299 | 299 | ) |
300 | 300 | ), |
301 | - ) ); |
|
302 | - $schema2 = new Schema( array( |
|
301 | + )); |
|
302 | + $schema2 = new Schema(array( |
|
303 | 303 | 'bugdb' => new Table('bugdb', |
304 | - array ( |
|
304 | + array( |
|
305 | 305 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
306 | 306 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
307 | 307 | ), |
308 | - array ( |
|
308 | + array( |
|
309 | 309 | 'primary' => new Index('primary', |
310 | 310 | array( |
311 | 311 | 'integerfield1' |
@@ -314,12 +314,12 @@ discard block |
||
314 | 314 | ) |
315 | 315 | ) |
316 | 316 | ), |
317 | - ) ); |
|
317 | + )); |
|
318 | 318 | |
319 | - $expected = new SchemaDiff ( array(), |
|
320 | - array ( |
|
321 | - 'bugdb' => new TableDiff( 'bugdb', array(), array(), array(), |
|
322 | - array ( |
|
319 | + $expected = new SchemaDiff(array(), |
|
320 | + array( |
|
321 | + 'bugdb' => new TableDiff('bugdb', array(), array(), array(), |
|
322 | + array( |
|
323 | 323 | 'primary' => new Index('primary', |
324 | 324 | array( |
325 | 325 | 'integerfield1' |
@@ -333,18 +333,18 @@ discard block |
||
333 | 333 | $expected->fromSchema = $schema1; |
334 | 334 | $expected->changedTables['bugdb']->fromTable = $schema1->getTable('bugdb'); |
335 | 335 | |
336 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
|
336 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
337 | 337 | } |
338 | 338 | |
339 | 339 | public function testCompareChangedIndex() |
340 | 340 | { |
341 | - $schema1 = new Schema( array( |
|
341 | + $schema1 = new Schema(array( |
|
342 | 342 | 'bugdb' => new Table('bugdb', |
343 | - array ( |
|
343 | + array( |
|
344 | 344 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
345 | 345 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
346 | 346 | ), |
347 | - array ( |
|
347 | + array( |
|
348 | 348 | 'primary' => new Index('primary', |
349 | 349 | array( |
350 | 350 | 'integerfield1' |
@@ -353,26 +353,26 @@ discard block |
||
353 | 353 | ) |
354 | 354 | ) |
355 | 355 | ), |
356 | - ) ); |
|
357 | - $schema2 = new Schema( array( |
|
356 | + )); |
|
357 | + $schema2 = new Schema(array( |
|
358 | 358 | 'bugdb' => new Table('bugdb', |
359 | - array ( |
|
359 | + array( |
|
360 | 360 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
361 | 361 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
362 | 362 | ), |
363 | - array ( |
|
363 | + array( |
|
364 | 364 | 'primary' => new Index('primary', |
365 | 365 | array('integerfield1', 'integerfield2'), |
366 | 366 | true |
367 | 367 | ) |
368 | 368 | ) |
369 | 369 | ), |
370 | - ) ); |
|
370 | + )); |
|
371 | 371 | |
372 | - $expected = new SchemaDiff ( array(), |
|
373 | - array ( |
|
374 | - 'bugdb' => new TableDiff( 'bugdb', array(), array(), array(), array(), |
|
375 | - array ( |
|
372 | + $expected = new SchemaDiff(array(), |
|
373 | + array( |
|
374 | + 'bugdb' => new TableDiff('bugdb', array(), array(), array(), array(), |
|
375 | + array( |
|
376 | 376 | 'primary' => new Index('primary', |
377 | 377 | array( |
378 | 378 | 'integerfield1', |
@@ -387,38 +387,38 @@ discard block |
||
387 | 387 | $expected->fromSchema = $schema1; |
388 | 388 | $expected->changedTables['bugdb']->fromTable = $schema1->getTable('bugdb'); |
389 | 389 | |
390 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 )); |
|
390 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | public function testCompareChangedIndexFieldPositions() |
394 | 394 | { |
395 | - $schema1 = new Schema( array( |
|
395 | + $schema1 = new Schema(array( |
|
396 | 396 | 'bugdb' => new Table('bugdb', |
397 | - array ( |
|
397 | + array( |
|
398 | 398 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
399 | 399 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
400 | 400 | ), |
401 | - array ( |
|
401 | + array( |
|
402 | 402 | 'primary' => new Index('primary', array('integerfield1', 'integerfield2'), true) |
403 | 403 | ) |
404 | 404 | ), |
405 | - ) ); |
|
406 | - $schema2 = new Schema( array( |
|
405 | + )); |
|
406 | + $schema2 = new Schema(array( |
|
407 | 407 | 'bugdb' => new Table('bugdb', |
408 | - array ( |
|
408 | + array( |
|
409 | 409 | 'integerfield1' => new Column('integerfield1', Type::getType('integer')), |
410 | 410 | 'integerfield2' => new Column('integerfield2', Type::getType('integer')), |
411 | 411 | ), |
412 | - array ( |
|
412 | + array( |
|
413 | 413 | 'primary' => new Index('primary', array('integerfield2', 'integerfield1'), true) |
414 | 414 | ) |
415 | 415 | ), |
416 | - ) ); |
|
416 | + )); |
|
417 | 417 | |
418 | - $expected = new SchemaDiff ( array(), |
|
419 | - array ( |
|
418 | + $expected = new SchemaDiff(array(), |
|
419 | + array( |
|
420 | 420 | 'bugdb' => new TableDiff('bugdb', array(), array(), array(), array(), |
421 | - array ( |
|
421 | + array( |
|
422 | 422 | 'primary' => new Index('primary', array('integerfield2', 'integerfield1'), true) |
423 | 423 | ) |
424 | 424 | ), |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | $expected->fromSchema = $schema1; |
428 | 428 | $expected->changedTables['bugdb']->fromTable = $schema1->getTable('bugdb'); |
429 | 429 | |
430 | - self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 )); |
|
430 | + self::assertEquals($expected, Comparator::compareSchemas($schema1, $schema2)); |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | public function testCompareSequences() |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | $c = new \Doctrine\DBAL\Schema\Comparator; |
822 | 822 | $diff = $c->compare($schema, $schemaNew); |
823 | 823 | |
824 | - self::assertSame($diff->changedSequences[0] , $schemaNew->getSequence('baz')); |
|
824 | + self::assertSame($diff->changedSequences[0], $schemaNew->getSequence('baz')); |
|
825 | 825 | } |
826 | 826 | |
827 | 827 | /** |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | $oldSchema = new Schema(array(), array(), $config); |
850 | 850 | $oldSchema->createTable('bar'); |
851 | 851 | |
852 | - $newSchema= new Schema(array(), array(), $config); |
|
852 | + $newSchema = new Schema(array(), array(), $config); |
|
853 | 853 | $newSchema->createTable('foo.bar'); |
854 | 854 | |
855 | 855 | $expected = new SchemaDiff(); |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | $oldSchema->createTable('taz'); |
871 | 871 | $oldSchema->createTable('war.tab'); |
872 | 872 | |
873 | - $newSchema= new Schema(array(), array(), $config); |
|
873 | + $newSchema = new Schema(array(), array(), $config); |
|
874 | 874 | $newSchema->createTable('bar.tab'); |
875 | 875 | $newSchema->createTable('baz.tab'); |
876 | 876 | $newSchema->createTable('war.tab'); |
@@ -1072,7 +1072,7 @@ discard block |
||
1072 | 1072 | * @param int $changeTableCount |
1073 | 1073 | * @param int $removeTableCount |
1074 | 1074 | */ |
1075 | - public function assertSchemaTableChangeCount($diff, $newTableCount=0, $changeTableCount=0, $removeTableCount=0) |
|
1075 | + public function assertSchemaTableChangeCount($diff, $newTableCount = 0, $changeTableCount = 0, $removeTableCount = 0) |
|
1076 | 1076 | { |
1077 | 1077 | self::assertCount($newTableCount, $diff->newTables); |
1078 | 1078 | self::assertCount($changeTableCount, $diff->changedTables); |
@@ -1085,7 +1085,7 @@ discard block |
||
1085 | 1085 | * @param int $changeSequenceCount |
1086 | 1086 | * @param int $changeSequenceCount |
1087 | 1087 | */ |
1088 | - public function assertSchemaSequenceChangeCount($diff, $newSequenceCount=0, $changeSequenceCount=0, $removeSequenceCount=0) |
|
1088 | + public function assertSchemaSequenceChangeCount($diff, $newSequenceCount = 0, $changeSequenceCount = 0, $removeSequenceCount = 0) |
|
1089 | 1089 | { |
1090 | 1090 | self::assertCount($newSequenceCount, $diff->newSequences, "Expected number of new sequences is wrong."); |
1091 | 1091 | self::assertCount($changeSequenceCount, $diff->changedSequences, "Expected number of changed sequences is wrong."); |
@@ -1240,7 +1240,7 @@ discard block |
||
1240 | 1240 | |
1241 | 1241 | public function testForeignKeyRemovalWithRenamedLocalColumn() |
1242 | 1242 | { |
1243 | - $fromSchema = new Schema( array( |
|
1243 | + $fromSchema = new Schema(array( |
|
1244 | 1244 | 'table1' => new Table('table1', |
1245 | 1245 | array( |
1246 | 1246 | 'id' => new Column('id', Type::getType('integer')), |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | new ForeignKeyConstraint(array('id_table1'), 'table1', array('id'), 'fk_table2_table1') |
1256 | 1256 | )) |
1257 | 1257 | )); |
1258 | - $toSchema = new Schema( array( |
|
1258 | + $toSchema = new Schema(array( |
|
1259 | 1259 | 'table2' => new Table('table2', |
1260 | 1260 | array( |
1261 | 1261 | 'id' => new Column('id', Type::getType('integer')), |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $this->getMockForAbstractClass('Doctrine\DBAL\Platforms\AbstractPlatform') |
76 | 76 | ); |
77 | 77 | |
78 | - $this->expectException( 'Doctrine\DBAL\Schema\SchemaException' ); |
|
78 | + $this->expectException('Doctrine\DBAL\Schema\SchemaException'); |
|
79 | 79 | $collector->acceptForeignKey($this->getTableMock(), $this->getStubKeyConstraint('')); |
80 | 80 | } |
81 | 81 | } |
@@ -37,13 +37,13 @@ |
||
37 | 37 | ['BINARY', 'b', 'CREATE TABLE "a" (bbb TEXT COLLATE NOCASE, bb TEXT COLLATE RTRIM, b VARCHAR(42) NOT NULL COLLATE BINARY)'], |
38 | 38 | ['BINARY', 'b', 'CREATE TABLE "a" (b VARCHAR(42) NOT NULL COLLATE BINARY, bb TEXT COLLATE RTRIM)'], |
39 | 39 | ['utf-8', 'bar#', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) COLLATE "utf-8" NOT NULL, "bar#" VARCHAR(255) COLLATE "utf-8" NOT NULL, baz VARCHAR(255) COLLATE "utf-8" NOT NULL, PRIMARY KEY(id))'], |
40 | - [null, 'bar#', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) NOT NULL, "bar#" VARCHAR(255) NOT NULL, baz VARCHAR(255) NOT NULL, PRIMARY KEY(id))'], |
|
41 | - ['utf-8', 'baz', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) COLLATE "utf-8" NOT NULL, "bar#" INTEGER NOT NULL, baz VARCHAR(255) COLLATE "utf-8" NOT NULL, PRIMARY KEY(id))'], |
|
42 | - [null, 'baz', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) NOT NULL, "bar#" INTEGER NOT NULL, baz VARCHAR(255) NOT NULL, PRIMARY KEY(id))'], |
|
40 | + [null, 'bar#', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) NOT NULL, "bar#" VARCHAR(255) NOT NULL, baz VARCHAR(255) NOT NULL, PRIMARY KEY(id))'], |
|
41 | + ['utf-8', 'baz', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) COLLATE "utf-8" NOT NULL, "bar#" INTEGER NOT NULL, baz VARCHAR(255) COLLATE "utf-8" NOT NULL, PRIMARY KEY(id))'], |
|
42 | + [null, 'baz', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) NOT NULL, "bar#" INTEGER NOT NULL, baz VARCHAR(255) NOT NULL, PRIMARY KEY(id))'], |
|
43 | 43 | ['utf-8', 'bar/', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) COLLATE "utf-8" NOT NULL, "bar/" VARCHAR(255) COLLATE "utf-8" NOT NULL, baz VARCHAR(255) COLLATE "utf-8" NOT NULL, PRIMARY KEY(id))'], |
44 | - [null, 'bar/', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) NOT NULL, "bar/" VARCHAR(255) NOT NULL, baz VARCHAR(255) NOT NULL, PRIMARY KEY(id))'], |
|
45 | - ['utf-8', 'baz', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) COLLATE "utf-8" NOT NULL, "bar/" INTEGER NOT NULL, baz VARCHAR(255) COLLATE "utf-8" NOT NULL, PRIMARY KEY(id))'], |
|
46 | - [null, 'baz', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) NOT NULL, "bar/" INTEGER NOT NULL, baz VARCHAR(255) NOT NULL, PRIMARY KEY(id))'], |
|
44 | + [null, 'bar/', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) NOT NULL, "bar/" VARCHAR(255) NOT NULL, baz VARCHAR(255) NOT NULL, PRIMARY KEY(id))'], |
|
45 | + ['utf-8', 'baz', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) COLLATE "utf-8" NOT NULL, "bar/" INTEGER NOT NULL, baz VARCHAR(255) COLLATE "utf-8" NOT NULL, PRIMARY KEY(id))'], |
|
46 | + [null, 'baz', 'CREATE TABLE dummy_table (id INTEGER NOT NULL, foo VARCHAR(255) NOT NULL, "bar/" INTEGER NOT NULL, baz VARCHAR(255) NOT NULL, PRIMARY KEY(id))'], |
|
47 | 47 | ]; |
48 | 48 | } |
49 | 49 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | public function testGetName() |
24 | 24 | { |
25 | - $table = new Table("foo", array(), array(), array()); |
|
25 | + $table = new Table("foo", array(), array(), array()); |
|
26 | 26 | self::assertEquals("foo", $table->getName()); |
27 | 27 | } |
28 | 28 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $this->expectException("Doctrine\DBAL\Schema\SchemaException"); |
254 | 254 | |
255 | 255 | $table = new Table("foo"); |
256 | - $table->addColumn("bar",'integer'); |
|
256 | + $table->addColumn("bar", 'integer'); |
|
257 | 257 | $table->addIndex(array("bar"), "invalid name %&/"); |
258 | 258 | } |
259 | 259 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $synchronizer = new SQLAzureFederationsSynchronizer($this->conn, $this->sm); |
13 | 13 | $sql = $synchronizer->getCreateSchema($schema); |
14 | 14 | |
15 | - self::assertEquals(array ( |
|
15 | + self::assertEquals(array( |
|
16 | 16 | "--Create Federation\nCREATE FEDERATION Orders_Federation (CustID INT RANGE)", |
17 | 17 | "USE FEDERATION Orders_Federation (CustID = 0) WITH RESET, FILTERING = OFF;", |
18 | 18 | "CREATE TABLE Products (ProductID INT NOT NULL, SupplierID INT NOT NULL, ProductName NVARCHAR(255) NOT NULL, Price NUMERIC(12, 2) NOT NULL, PRIMARY KEY (ProductID))", |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | protected function setUp() |
23 | 23 | { |
24 | - if (!isset($GLOBALS['db_type']) || strpos($GLOBALS['db_type'], "sqlsrv") === false) { |
|
24 | + if ( ! isset($GLOBALS['db_type']) || strpos($GLOBALS['db_type'], "sqlsrv") === false) { |
|
25 | 25 | $this->markTestSkipped('No driver or sqlserver driver specified.'); |
26 | 26 | } |
27 | 27 |