diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index a30a8a3a..ca5ce765 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -4,10 +4,6 @@
tests
-
-
-
-
.
diff --git a/tests/controller/ContentControllerSearchExtensionTest.php b/tests/controller/ContentControllerSearchExtensionTest.php
index 9e9bfe2e..feee8c76 100644
--- a/tests/controller/ContentControllerSearchExtensionTest.php
+++ b/tests/controller/ContentControllerSearchExtensionTest.php
@@ -10,6 +10,12 @@ use SilverStripe\Dev\SapphireTest;
class ContentControllerSearchExtensionTest extends SapphireTest
{
+ protected static $required_extensions = array(
+ ContentController::class => [
+ \SilverStripe\CMS\Search\ContentControllerSearchExtension::class,
+ ],
+ );
+
public function testCustomSearchFormClassesToTest()
{
$page = new Page();
@@ -25,9 +31,9 @@ class ContentControllerSearchExtensionTest extends SapphireTest
}
}
- public function setUpOnce()
+ public static function setUpBeforeClass()
{
- parent::setUpOnce();
+ parent::setUpBeforeClass();
FulltextSearchable::enable('SilverStripe\\Assets\\File');
}
@@ -37,9 +43,9 @@ class ContentControllerSearchExtensionTest extends SapphireTest
* properly at the end of the test. This becomes apparent when a later test tries to
* ALTER TABLE File and add fulltext indexes with the InnoDB table type.
*/
- public function tearDownOnce()
+ public static function tearDownAfterClass()
{
- parent::tearDownOnce();
+ parent::tearDownAfterClass();
Config::inst()->update('SilverStripe\\Assets\\File', 'create_table_options', array('SilverStripe\ORM\Connect\MySQLDatabase' => 'ENGINE=InnoDB'));
File::remove_extension('SilverStripe\\ORM\\Search\\FulltextSearchable');
diff --git a/tests/model/SiteTreeBacklinksTest.php b/tests/model/SiteTreeBacklinksTest.php
index 3b830b12..bab73875 100644
--- a/tests/model/SiteTreeBacklinksTest.php
+++ b/tests/model/SiteTreeBacklinksTest.php
@@ -16,7 +16,7 @@ class SiteTreeBacklinksTest extends SapphireTest
{
protected static $fixture_file = "SiteTreeBacklinksTest.yml";
- protected $requiredExtensions = array(
+ protected static $required_extensions = array(
'SilverStripe\\CMS\\Model\\SiteTree' => array('SiteTreeBacklinksTest_DOD'),
);
diff --git a/tests/model/SiteTreePermissionsTest.php b/tests/model/SiteTreePermissionsTest.php
index f5ced9ae..4312f5c8 100644
--- a/tests/model/SiteTreePermissionsTest.php
+++ b/tests/model/SiteTreePermissionsTest.php
@@ -20,7 +20,7 @@ class SiteTreePermissionsTest extends FunctionalTest
{
protected static $fixture_file = "SiteTreePermissionsTest.yml";
- protected $illegalExtensions = array(
+ protected static $illegal_extensions = array(
SiteTree::class => array('SiteTreeSubsites')
);
diff --git a/tests/model/SiteTreeTest.php b/tests/model/SiteTreeTest.php
index 36f3e9f0..ede17e43 100644
--- a/tests/model/SiteTreeTest.php
+++ b/tests/model/SiteTreeTest.php
@@ -37,11 +37,11 @@ class SiteTreeTest extends SapphireTest
protected static $fixture_file = 'SiteTreeTest.yml';
- protected $illegalExtensions = array(
- SiteTree::class => array('SiteTreeSubsites', 'Translatable')
+ protected static $illegal_extensions = array(
+ SiteTree::class => array('SiteTreeSubsites', 'Translatable'),
);
- protected $extraDataObjects = array(
+ protected static $extra_dataobjects = array(
SiteTreeTest_ClassA::class,
SiteTreeTest_ClassB::class,
SiteTreeTest_ClassC::class,
diff --git a/tests/model/VirtualPageTest.php b/tests/model/VirtualPageTest.php
index 41679ef2..8b7f84e6 100644
--- a/tests/model/VirtualPageTest.php
+++ b/tests/model/VirtualPageTest.php
@@ -20,7 +20,7 @@ class VirtualPageTest extends FunctionalTest
protected static $use_draft_site = false;
protected $autoFollowRedirection = false;
- protected $extraDataObjects = array(
+ protected static $extra_dataobjects = array(
'VirtualPageTest_ClassA',
'VirtualPageTest_ClassB',
'VirtualPageTest_ClassC',
@@ -31,11 +31,11 @@ class VirtualPageTest extends FunctionalTest
'VirtualPageTest_VirtualPageSub',
);
- protected $illegalExtensions = array(
- SiteTree::class => array('SiteTreeSubsites', 'Translatable')
+ protected static $illegal_extensions = array(
+ SiteTree::class => array('SiteTreeSubsites', 'Translatable'),
);
- protected $requiredExtensions = array(
+ protected static $required_extensions = array(
SiteTree::class => array('VirtualPageTest_PageExtension')
);
diff --git a/tests/search/SearchFormTest.php b/tests/search/SearchFormTest.php
index 4b775846..fb5c26ae 100644
--- a/tests/search/SearchFormTest.php
+++ b/tests/search/SearchFormTest.php
@@ -29,7 +29,7 @@ class ZZZSearchFormTest extends FunctionalTest
protected static $fixture_file = 'SearchFormTest.yml';
- protected $illegalExtensions = array(
+ protected static $illegal_extensions = array(
SiteTree::class => array('SiteTreeSubsites', 'Translatable')
);
@@ -46,16 +46,16 @@ class ZZZSearchFormTest extends FunctionalTest
}
}
- public function setUpOnce()
+ public static function setUpBeforeClass()
{
// HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE
// MySQL will need a different table type
- self::kill_temp_db();
+ static::kill_temp_db();
Config::modify();
FulltextSearchable::enable();
- self::create_temp_db();
- $this->resetDBSchema(true);
- parent::setUpOnce();
+ static::create_temp_db();
+ static::resetDBSchema(true);
+ parent::setUpBeforeClass();
}
public function setUp()