public function testGetSequenceNameCustom() { $table = new Table('foo'); $table->setIdMethod(IDMethod::NATIVE); $idMethodParameter = new IdMethodParameter(); $idMethodParameter->setValue('foo_sequence'); $table->addIdMethodParameter($idMethodParameter); $table->setIdMethod(IDMethod::NATIVE); $expected = 'foo_sequence'; $this->assertEquals($expected, $this->getPlatform()->getSequenceName($table)); }
public function testGetDropTableWithSequenceDDL() { $table = new Table('foo'); $idMethodParameter = new IdMethodParameter(); $idMethodParameter->setValue('foo_sequence'); $table->addIdMethodParameter($idMethodParameter); $table->setIdMethod(IDMethod::NATIVE); $expected = "\nDROP TABLE foo CASCADE CONSTRAINTS;\n\nDROP SEQUENCE foo_sequence;\n"; $this->assertEquals($expected, $this->getPlatform()->getDropTableDDL($table)); }
public function testGetDropTableWithSequenceDDL() { $table = new Table('foo'); $idMethodParameter = new IdMethodParameter(); $idMethodParameter->setValue('foo_sequence'); $table->addIdMethodParameter($idMethodParameter); $table->setIdMethod(IDMethod::NATIVE); $expected = ' DROP TABLE IF EXISTS "foo" CASCADE; DROP SEQUENCE "foo_sequence"; '; $this->assertEquals($expected, $this->getPlatform()->getDropTableDDL($table)); }