@@ 324-339 (lines=16) @@ | ||
321 | self::assertEquals('DROP VIEW fooview', $this->_platform->getDropViewSQL('fooview')); |
|
322 | } |
|
323 | ||
324 | public function testGeneratesPrimaryKeyDeclarationSQL() |
|
325 | { |
|
326 | self::assertEquals( |
|
327 | 'CONSTRAINT pk PRIMARY KEY CLUSTERED (a, b)', |
|
328 | $this->_platform->getPrimaryKeyDeclarationSQL( |
|
329 | new Index(null, array('a', 'b'), true, true, array('clustered')), |
|
330 | 'pk' |
|
331 | ) |
|
332 | ); |
|
333 | self::assertEquals( |
|
334 | 'PRIMARY KEY (a, b)', |
|
335 | $this->_platform->getPrimaryKeyDeclarationSQL( |
|
336 | new Index(null, array('a', 'b'), true, true) |
|
337 | ) |
|
338 | ); |
|
339 | } |
|
340 | ||
341 | public function testCannotGeneratePrimaryKeyDeclarationSQLWithEmptyColumns() |
|
342 | { |
|
@@ 366-379 (lines=14) @@ | ||
363 | ); |
|
364 | } |
|
365 | ||
366 | public function testGeneratesUniqueConstraintDeclarationSQL() |
|
367 | { |
|
368 | self::assertEquals( |
|
369 | 'CONSTRAINT unique_constraint UNIQUE CLUSTERED (a, b)', |
|
370 | $this->_platform->getUniqueConstraintDeclarationSQL( |
|
371 | 'unique_constraint', |
|
372 | new Index(null, array('a', 'b'), true, false, array('clustered')) |
|
373 | ) |
|
374 | ); |
|
375 | self::assertEquals( |
|
376 | 'UNIQUE (a, b)', |
|
377 | $this->_platform->getUniqueConstraintDeclarationSQL(null, new Index(null, array('a', 'b'), true, false)) |
|
378 | ); |
|
379 | } |
|
380 | ||
381 | public function testCannotGenerateUniqueConstraintDeclarationSQLWithEmptyColumns() |
|
382 | { |