From 6eafa1dfdb4df5844f9fd0fe574170b7d2469d44 Mon Sep 17 00:00:00 2001 From: Aaron Cooper Date: Mon, 13 Feb 2017 15:19:55 +1300 Subject: [PATCH] Force PostgresSQLDatabaseTest From Framework 3.2 onwards, unit tests are run on the main DB unless the objects are created via fixtures or the $usesDatabase property of SapphireTest are used. This test creates two pages programatically and they appear in the main sitetree after running the test. --- tests/PostgreSQLDatabaseTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/PostgreSQLDatabaseTest.php b/tests/PostgreSQLDatabaseTest.php index 947c99e..0672a8a 100644 --- a/tests/PostgreSQLDatabaseTest.php +++ b/tests/PostgreSQLDatabaseTest.php @@ -11,6 +11,9 @@ use SilverStripe\PostgreSQL\PostgreSQLDatabase; */ class PostgreSQLDatabaseTest extends SapphireTest { + + protected $usesDatabase = true; + public function testReadOnlyTransaction() { if (