From 8f70ac89ca00d6facee40205c26cda2d2c183230 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 18 Oct 2018 20:26:42 +1300 Subject: [PATCH] FIX: Removed test that has been moved back to framework This test has been added for all database types in framework in https://github.com/silverstripe/silverstripe-framework/pull/8448 --- tests/PostgreSQLDatabaseTest.php | 57 -------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 tests/PostgreSQLDatabaseTest.php diff --git a/tests/PostgreSQLDatabaseTest.php b/tests/PostgreSQLDatabaseTest.php deleted file mode 100644 index 2c9ebe3..0000000 --- a/tests/PostgreSQLDatabaseTest.php +++ /dev/null @@ -1,57 +0,0 @@ -supportsTransactions() == true - && DB::get_conn() instanceof PostgreSQLDatabase - ) { - $page = new Page(); - $page->Title = 'Read only success'; - $page->write(); - - DB::get_conn()->transactionStart('READ ONLY'); - - try { - $page = new Page(); - $page->Title = 'Read only page failed'; - $page->write(); - } catch (Exception $e) { - //could not write this record - //We need to do a rollback or a commit otherwise we'll get error messages - DB::get_conn()->transactionRollback(); - } - - DB::get_conn()->transactionEnd(); - - DataObject::flush_and_destroy_cache(); - - $success = DataObject::get('Page', "\"Title\"='Read only success'"); - $fail = DataObject::get('Page', "\"Title\"='Read only page failed'"); - - //This page should be in the system - $this->assertTrue(is_object($success) && $success->exists()); - - //This page should NOT exist, we had 'read only' permissions - $this->assertFalse(is_object($fail) && $fail->exists()); - } else { - $this->markTestSkipped('Current database is not PostgreSQL'); - } - } -}