AbstractPlatformTestCase::getGenerateForeignKeySql() is internal to the test and cannot return NULL

parent 15d9be0b
...@@ -152,7 +152,7 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase ...@@ -152,7 +152,7 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
return 'CREATE UNIQUE INDEX index_name ON test (test, test2)'; return 'CREATE UNIQUE INDEX index_name ON test (test, test2)';
} }
public function getGenerateForeignKeySql() : string protected function getGenerateForeignKeySql() : string
{ {
return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)'; return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)';
} }
......
...@@ -250,7 +250,7 @@ abstract class AbstractPlatformTestCase extends DbalTestCase ...@@ -250,7 +250,7 @@ abstract class AbstractPlatformTestCase extends DbalTestCase
self::assertEquals($sql, $this->getGenerateForeignKeySql()); self::assertEquals($sql, $this->getGenerateForeignKeySql());
} }
abstract public function getGenerateForeignKeySql() : string; abstract protected function getGenerateForeignKeySql() : string;
public function testGeneratesConstraintCreationSql() : void public function testGeneratesConstraintCreationSql() : void
{ {
......
...@@ -65,7 +65,7 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa ...@@ -65,7 +65,7 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
return 'CREATE INDEX my_idx ON mytable (user_name, last_login)'; return 'CREATE INDEX my_idx ON mytable (user_name, last_login)';
} }
public function getGenerateForeignKeySql() : string protected function getGenerateForeignKeySql() : string
{ {
return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id) NOT DEFERRABLE INITIALLY IMMEDIATE'; return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id) NOT DEFERRABLE INITIALLY IMMEDIATE';
} }
......
...@@ -181,7 +181,7 @@ abstract class AbstractSQLServerPlatformTestCase extends AbstractPlatformTestCas ...@@ -181,7 +181,7 @@ abstract class AbstractSQLServerPlatformTestCase extends AbstractPlatformTestCas
return 'CREATE UNIQUE INDEX index_name ON test (test, test2) WHERE test IS NOT NULL AND test2 IS NOT NULL'; return 'CREATE UNIQUE INDEX index_name ON test (test, test2) WHERE test IS NOT NULL AND test2 IS NOT NULL';
} }
public function getGenerateForeignKeySql() : string protected function getGenerateForeignKeySql() : string
{ {
return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)'; return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)';
} }
......
...@@ -42,7 +42,7 @@ class DB2PlatformTest extends AbstractPlatformTestCase ...@@ -42,7 +42,7 @@ class DB2PlatformTest extends AbstractPlatformTestCase
]; ];
} }
public function getGenerateForeignKeySql() : string protected function getGenerateForeignKeySql() : string
{ {
return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)'; return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)';
} }
......
...@@ -234,7 +234,7 @@ class OraclePlatformTest extends AbstractPlatformTestCase ...@@ -234,7 +234,7 @@ class OraclePlatformTest extends AbstractPlatformTestCase
return 'CREATE UNIQUE INDEX index_name ON test (test, test2)'; return 'CREATE UNIQUE INDEX index_name ON test (test, test2)';
} }
public function getGenerateForeignKeySql() : string protected function getGenerateForeignKeySql() : string
{ {
return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)'; return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)';
} }
......
...@@ -43,7 +43,7 @@ class SQLAnywherePlatformTest extends AbstractPlatformTestCase ...@@ -43,7 +43,7 @@ class SQLAnywherePlatformTest extends AbstractPlatformTestCase
]; ];
} }
public function getGenerateForeignKeySql() : string protected function getGenerateForeignKeySql() : string
{ {
return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)'; return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)';
} }
......
...@@ -286,9 +286,9 @@ class SqlitePlatformTest extends AbstractPlatformTestCase ...@@ -286,9 +286,9 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
parent::testGeneratesConstraintCreationSql(); parent::testGeneratesConstraintCreationSql();
} }
public function getGenerateForeignKeySql() : string protected function getGenerateForeignKeySql() : string
{ {
return null; return '';
} }
public function testModifyLimitQuery() : void public function testModifyLimitQuery() : void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment