diff --git a/src/Dev/FunctionalTest.php b/src/Dev/FunctionalTest.php
index d96f716de..99ecfba9f 100644
--- a/src/Dev/FunctionalTest.php
+++ b/src/Dev/FunctionalTest.php
@@ -80,7 +80,7 @@ class FunctionalTest extends SapphireTest
return $this->mainSession->session();
}
- public function setUp()
+ protected function setUp()
{
// Skip calling FunctionalTest directly.
if (get_class($this) == __CLASS__) {
@@ -107,7 +107,7 @@ class FunctionalTest extends SapphireTest
SecurityToken::disable();
}
- public function tearDown()
+ protected function tearDown()
{
SecurityToken::enable();
diff --git a/src/Dev/SapphireTest.php b/src/Dev/SapphireTest.php
index ddd9cd74c..f22dda13b 100644
--- a/src/Dev/SapphireTest.php
+++ b/src/Dev/SapphireTest.php
@@ -228,7 +228,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase
protected $originalEnv = null;
- public function setUp()
+ protected function setUp()
{
//nest config and injector for each test so they are effectively sandboxed per test
Config::nest();
@@ -562,7 +562,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase
return $path;
}
- public function tearDown()
+ protected function tearDown()
{
// Preserve memory settings
ini_set('memory_limit', ($this->originalMemoryLimit) ? $this->originalMemoryLimit : -1);
diff --git a/tests/php/Control/ControllerTest.php b/tests/php/Control/ControllerTest.php
index 87f272cd6..a2f9ba6d1 100644
--- a/tests/php/Control/ControllerTest.php
+++ b/tests/php/Control/ControllerTest.php
@@ -47,7 +47,7 @@ class ControllerTest extends FunctionalTest
UnsecuredController::class,
];
- public function setUp()
+ protected function setUp()
{
parent::setUp();
Director::config()->update('alternate_base_url', '/');
@@ -62,7 +62,7 @@ class ControllerTest extends FunctionalTest
SSViewer::set_themes($themes);
}
- public function tearDown()
+ protected function tearDown()
{
Deprecation::restore_settings($this->depSettings);
parent::tearDown();
diff --git a/tests/php/Control/CookieTest.php b/tests/php/Control/CookieTest.php
index 533a1506c..072fa2c76 100644
--- a/tests/php/Control/CookieTest.php
+++ b/tests/php/Control/CookieTest.php
@@ -12,14 +12,14 @@ class CookieTest extends SapphireTest
private $cookieInst;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
Injector::nest();
Injector::inst()->registerService(new CookieJar($_COOKIE), 'SilverStripe\\Control\\Cookie_Backend');
}
- public function tearDown()
+ protected function tearDown()
{
//restore the cookie_backend
Injector::unnest();
diff --git a/tests/php/Control/DirectorTest.php b/tests/php/Control/DirectorTest.php
index c2bc3a5ea..218d0e698 100644
--- a/tests/php/Control/DirectorTest.php
+++ b/tests/php/Control/DirectorTest.php
@@ -32,7 +32,7 @@ class DirectorTest extends SapphireTest
TestController::class
];
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -77,7 +77,7 @@ class DirectorTest extends SapphireTest
Director::config()->set('rules', $this->getExtraRoutes());
}
- public function tearDown()
+ protected function tearDown()
{
$_GET = $this->originalGet;
$_SESSION = $this->originalSession;
diff --git a/tests/php/Control/Email/SwiftPluginTest.php b/tests/php/Control/Email/SwiftPluginTest.php
index 348b742e7..da809552d 100644
--- a/tests/php/Control/Email/SwiftPluginTest.php
+++ b/tests/php/Control/Email/SwiftPluginTest.php
@@ -9,7 +9,7 @@ use SilverStripe\Dev\SapphireTest;
class SwiftPluginTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Control/RSS/RSSFeedTest.php b/tests/php/Control/RSS/RSSFeedTest.php
index b90ea2c1a..d1a76cce1 100644
--- a/tests/php/Control/RSS/RSSFeedTest.php
+++ b/tests/php/Control/RSS/RSSFeedTest.php
@@ -96,7 +96,7 @@ class RSSFeedTest extends SapphireTest
$this->assertNotContains('
Test Custom Template', $content);
}
- public function setUp()
+ protected function setUp()
{
parent::setUp();
Config::inst()->update(Director::class, 'alternate_base_url', '/');
@@ -113,7 +113,7 @@ class RSSFeedTest extends SapphireTest
);
}
- public function tearDown()
+ protected function tearDown()
{
parent::tearDown();
$_SERVER['HTTP_HOST'] = self::$original_host;
diff --git a/tests/php/Core/ClassInfoTest.php b/tests/php/Core/ClassInfoTest.php
index a8e96929c..329f8b442 100644
--- a/tests/php/Core/ClassInfoTest.php
+++ b/tests/php/Core/ClassInfoTest.php
@@ -31,7 +31,7 @@ class ClassInfoTest extends SapphireTest
WithRelation::class,
);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
ClassInfo::reset_db_cache();
diff --git a/tests/php/Core/CoreTest.php b/tests/php/Core/CoreTest.php
index 4011206e1..3d6700764 100644
--- a/tests/php/Core/CoreTest.php
+++ b/tests/php/Core/CoreTest.php
@@ -14,7 +14,7 @@ class CoreTest extends SapphireTest
protected $tempPath;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->tempPath = Director::baseFolder() . DIRECTORY_SEPARATOR . 'silverstripe-cache';
@@ -51,7 +51,7 @@ class CoreTest extends SapphireTest
}
}
- public function tearDown()
+ protected function tearDown()
{
parent::tearDown();
$user = getTempFolderUsername();
diff --git a/tests/php/Core/Injector/InjectorTest.php b/tests/php/Core/Injector/InjectorTest.php
index 5f4877597..4fa6627da 100644
--- a/tests/php/Core/Injector/InjectorTest.php
+++ b/tests/php/Core/Injector/InjectorTest.php
@@ -41,14 +41,14 @@ class InjectorTest extends SapphireTest
protected $nestingLevel = 0;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->nestingLevel = 0;
}
- public function tearDown()
+ protected function tearDown()
{
while ($this->nestingLevel > 0) {
diff --git a/tests/php/Core/Manifest/ClassLoaderTest.php b/tests/php/Core/Manifest/ClassLoaderTest.php
index 7a2306f5c..cb82edbf9 100644
--- a/tests/php/Core/Manifest/ClassLoaderTest.php
+++ b/tests/php/Core/Manifest/ClassLoaderTest.php
@@ -32,7 +32,7 @@ class ClassLoaderTest extends SapphireTest
*/
protected $testManifest2;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Core/Manifest/ClassManifestTest.php b/tests/php/Core/Manifest/ClassManifestTest.php
index 58918f164..378a0780e 100644
--- a/tests/php/Core/Manifest/ClassManifestTest.php
+++ b/tests/php/Core/Manifest/ClassManifestTest.php
@@ -27,7 +27,7 @@ class ClassManifestTest extends SapphireTest
*/
protected $manifestTests;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Core/Manifest/ConfigManifestTest.php b/tests/php/Core/Manifest/ConfigManifestTest.php
index 0c73c2a94..602795d2c 100644
--- a/tests/php/Core/Manifest/ConfigManifestTest.php
+++ b/tests/php/Core/Manifest/ConfigManifestTest.php
@@ -12,7 +12,7 @@ use SilverStripe\Dev\SapphireTest;
class ConfigManifestTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -20,7 +20,7 @@ class ConfigManifestTest extends SapphireTest
ModuleLoader::instance()->pushManifest($moduleManifest);
}
- public function tearDown()
+ protected function tearDown()
{
ModuleLoader::instance()->popManifest();
parent::tearDown();
diff --git a/tests/php/Core/Manifest/ModuleManifestTest.php b/tests/php/Core/Manifest/ModuleManifestTest.php
index cf58c2686..001159509 100644
--- a/tests/php/Core/Manifest/ModuleManifestTest.php
+++ b/tests/php/Core/Manifest/ModuleManifestTest.php
@@ -18,7 +18,7 @@ class ModuleManifestTest extends SapphireTest
*/
protected $manifest;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Core/Manifest/NamespacedClassManifestTest.php b/tests/php/Core/Manifest/NamespacedClassManifestTest.php
index f7dcff190..b5f69108e 100644
--- a/tests/php/Core/Manifest/NamespacedClassManifestTest.php
+++ b/tests/php/Core/Manifest/NamespacedClassManifestTest.php
@@ -23,7 +23,7 @@ class NamespacedClassManifestTest extends SapphireTest
*/
protected $manifest;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -32,7 +32,7 @@ class NamespacedClassManifestTest extends SapphireTest
ClassLoader::instance()->pushManifest($this->manifest, false);
}
- public function tearDown()
+ protected function tearDown()
{
parent::tearDown();
ClassLoader::instance()->popManifest();
diff --git a/tests/php/Core/Manifest/ThemeResourceLoaderTest.php b/tests/php/Core/Manifest/ThemeResourceLoaderTest.php
index d89102d42..41e974b81 100644
--- a/tests/php/Core/Manifest/ThemeResourceLoaderTest.php
+++ b/tests/php/Core/Manifest/ThemeResourceLoaderTest.php
@@ -29,7 +29,7 @@ class ThemeResourceLoaderTest extends SapphireTest
/**
* Set up manifest before each test
*/
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Core/MemoryLimitTest.php b/tests/php/Core/MemoryLimitTest.php
index c407fb5f1..f5717fd58 100644
--- a/tests/php/Core/MemoryLimitTest.php
+++ b/tests/php/Core/MemoryLimitTest.php
@@ -76,7 +76,7 @@ class MemoryLimitTest extends SapphireTest
private $origMemLimit, $origTimeLimit;
- public function setUp()
+ protected function setUp()
{
$this->origMemLimit = ini_get('memory_limit');
$this->origTimeLimit = ini_get('max_execution_time');
@@ -86,7 +86,7 @@ class MemoryLimitTest extends SapphireTest
set_increase_time_limit_max(-1);
}
- public function tearDown()
+ protected function tearDown()
{
ini_set('memory_limit', $this->origMemLimit);
set_time_limit($this->origTimeLimit);
diff --git a/tests/php/Core/ObjectTest.php b/tests/php/Core/ObjectTest.php
index 5b8645f06..aa9c49f69 100644
--- a/tests/php/Core/ObjectTest.php
+++ b/tests/php/Core/ObjectTest.php
@@ -26,7 +26,7 @@ use SilverStripe\Control\Controller;
class ObjectTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
Injector::inst()->unregisterAllObjects();
diff --git a/tests/php/Core/PhpSyntaxTest.php b/tests/php/Core/PhpSyntaxTest.php
index 60500371f..e7da91bad 100644
--- a/tests/php/Core/PhpSyntaxTest.php
+++ b/tests/php/Core/PhpSyntaxTest.php
@@ -9,7 +9,7 @@ use SilverStripe\Dev\SapphireTest;
*/
class PhpSyntaxTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->markTestSkipped('This needs to be written to include only core php files, not test/thirdparty files');
diff --git a/tests/php/Core/Startup/ErrorControlChainTest.php b/tests/php/Core/Startup/ErrorControlChainTest.php
index bf6fdc8b5..f04de6ef7 100644
--- a/tests/php/Core/Startup/ErrorControlChainTest.php
+++ b/tests/php/Core/Startup/ErrorControlChainTest.php
@@ -10,7 +10,7 @@ use Exception;
class ErrorControlChainTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
// Check we can run PHP at all
diff --git a/tests/php/Core/Startup/ParameterConfirmationTokenTest.php b/tests/php/Core/Startup/ParameterConfirmationTokenTest.php
index 2799b79cb..d4af7eade 100644
--- a/tests/php/Core/Startup/ParameterConfirmationTokenTest.php
+++ b/tests/php/Core/Startup/ParameterConfirmationTokenTest.php
@@ -26,7 +26,7 @@ class ParameterConfirmationTokenTest extends SapphireTest
protected $oldHost = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->oldHost = $_SERVER['HTTP_HOST'];
@@ -40,7 +40,7 @@ class ParameterConfirmationTokenTest extends SapphireTest
$_GET['parameterconfirmationtokentest_emptytokentoken'] = '';
}
- public function tearDown()
+ protected function tearDown()
{
foreach ($_GET as $param => $value) {
if (stripos($param, 'parameterconfirmationtokentest_') === 0) {
diff --git a/tests/php/Dev/BulkLoaderResultTest.php b/tests/php/Dev/BulkLoaderResultTest.php
index f98df93bd..c4a8c8d5d 100644
--- a/tests/php/Dev/BulkLoaderResultTest.php
+++ b/tests/php/Dev/BulkLoaderResultTest.php
@@ -10,7 +10,7 @@ class BulkLoaderResultTest extends SapphireTest
{
protected $extraDataObjects = array(Player::class);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
Player::create(array('Name' => 'Vincent', 'Status' => 'Available'))->write();
diff --git a/tests/php/Dev/CSVParserTest.php b/tests/php/Dev/CSVParserTest.php
index 70af399ae..0e06b0363 100644
--- a/tests/php/Dev/CSVParserTest.php
+++ b/tests/php/Dev/CSVParserTest.php
@@ -15,7 +15,7 @@ class CSVParserTest extends SapphireTest
*/
protected $csvPath = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->csvPath = __DIR__ . '/CsvBulkLoaderTest/csv/';
diff --git a/tests/php/Dev/CsvBulkLoaderTest.php b/tests/php/Dev/CsvBulkLoaderTest.php
index 6dcd50a57..20966a7d2 100644
--- a/tests/php/Dev/CsvBulkLoaderTest.php
+++ b/tests/php/Dev/CsvBulkLoaderTest.php
@@ -30,7 +30,7 @@ class CsvBulkLoaderTest extends SapphireTest
*/
protected $csvPath = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->csvPath = __DIR__ . '/CsvBulkLoaderTest/csv/';
diff --git a/tests/php/Dev/DeprecationTest.php b/tests/php/Dev/DeprecationTest.php
index ab9b4396c..5c30e8e31 100644
--- a/tests/php/Dev/DeprecationTest.php
+++ b/tests/php/Dev/DeprecationTest.php
@@ -12,7 +12,7 @@ class DeprecationTest extends SapphireTest
static $originalVersionInfo;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -21,7 +21,7 @@ class DeprecationTest extends SapphireTest
Deprecation::set_enabled(true);
}
- public function tearDown()
+ protected function tearDown()
{
Deprecation::restore_settings(self::$originalVersionInfo);
parent::tearDown();
diff --git a/tests/php/Dev/DevAdminControllerTest.php b/tests/php/Dev/DevAdminControllerTest.php
index ab8210ff9..a27a118f9 100644
--- a/tests/php/Dev/DevAdminControllerTest.php
+++ b/tests/php/Dev/DevAdminControllerTest.php
@@ -14,7 +14,7 @@ use SilverStripe\Dev\Tests\DevAdminControllerTest\Controller1;
class DevAdminControllerTest extends FunctionalTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Forms/DateFieldTest.php b/tests/php/Forms/DateFieldTest.php
index 8cceffef1..fbfe18e89 100644
--- a/tests/php/Forms/DateFieldTest.php
+++ b/tests/php/Forms/DateFieldTest.php
@@ -11,7 +11,7 @@ use SilverStripe\ORM\FieldType\DBDatetime;
class DateFieldTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
i18n::set_locale('en_NZ');
diff --git a/tests/php/Forms/DatetimeFieldTest.php b/tests/php/Forms/DatetimeFieldTest.php
index eb5e03b35..9969bb24f 100644
--- a/tests/php/Forms/DatetimeFieldTest.php
+++ b/tests/php/Forms/DatetimeFieldTest.php
@@ -19,14 +19,14 @@ class DatetimeFieldTest extends SapphireTest
{
protected $timezone = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
i18n::set_locale('en_NZ');
$this->timezone = date_default_timezone_get();
}
- public function tearDown()
+ protected function tearDown()
{
date_default_timezone_set($this->timezone);
parent::tearDown(); // TODO: Change the autogenerated stub
diff --git a/tests/php/Forms/FormTest.php b/tests/php/Forms/FormTest.php
index ac6db41ad..d1c1b1b0b 100644
--- a/tests/php/Forms/FormTest.php
+++ b/tests/php/Forms/FormTest.php
@@ -46,7 +46,7 @@ class FormTest extends FunctionalTest
ControllerWithStrictPostCheck::class,
];
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Forms/GridField/GridFieldDeleteActionTest.php b/tests/php/Forms/GridField/GridFieldDeleteActionTest.php
index 603f00707..c6d200c39 100644
--- a/tests/php/Forms/GridField/GridFieldDeleteActionTest.php
+++ b/tests/php/Forms/GridField/GridFieldDeleteActionTest.php
@@ -56,7 +56,7 @@ class GridFieldDeleteActionTest extends SapphireTest
Permissions::class
];
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->list = new DataList(Team::class);
diff --git a/tests/php/Forms/GridField/GridFieldEditButtonTest.php b/tests/php/Forms/GridField/GridFieldEditButtonTest.php
index b434738fb..c3eaeced1 100644
--- a/tests/php/Forms/GridField/GridFieldEditButtonTest.php
+++ b/tests/php/Forms/GridField/GridFieldEditButtonTest.php
@@ -51,7 +51,7 @@ class GridFieldEditButtonTest extends SapphireTest
Permissions::class
);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->list = new DataList(Team::class);
diff --git a/tests/php/Forms/GridField/GridFieldExportButtonTest.php b/tests/php/Forms/GridField/GridFieldExportButtonTest.php
index cee1378df..08b7b1b94 100644
--- a/tests/php/Forms/GridField/GridFieldExportButtonTest.php
+++ b/tests/php/Forms/GridField/GridFieldExportButtonTest.php
@@ -29,7 +29,7 @@ class GridFieldExportButtonTest extends SapphireTest
NoView::class
);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Forms/GridField/GridFieldPaginatorTest.php b/tests/php/Forms/GridField/GridFieldPaginatorTest.php
index f88558946..47c436e1f 100644
--- a/tests/php/Forms/GridField/GridFieldPaginatorTest.php
+++ b/tests/php/Forms/GridField/GridFieldPaginatorTest.php
@@ -49,7 +49,7 @@ class GridFieldPaginatorTest extends FunctionalTest
Cheerleader::class,
);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->list = new DataList(Team::class);
diff --git a/tests/php/Forms/GridField/GridFieldPrintButtonTest.php b/tests/php/Forms/GridField/GridFieldPrintButtonTest.php
index 0ddd59582..26a1119ec 100644
--- a/tests/php/Forms/GridField/GridFieldPrintButtonTest.php
+++ b/tests/php/Forms/GridField/GridFieldPrintButtonTest.php
@@ -19,7 +19,7 @@ class GridFieldPrintButtonTest extends SapphireTest
TestObject::class
);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php b/tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php
index 275a85bd3..72f0cd058 100644
--- a/tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php
+++ b/tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php
@@ -37,7 +37,7 @@ class HTMLEditorFieldTest extends FunctionalTest
protected $extraDataObjects = array(TestObject::class);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -67,7 +67,7 @@ class HTMLEditorFieldTest extends FunctionalTest
}
}
- public function tearDown()
+ protected function tearDown()
{
TestAssetStore::reset();
parent::tearDown();
diff --git a/tests/php/Forms/HTMLEditor/HTMLEditorFieldToolbarTest.php b/tests/php/Forms/HTMLEditor/HTMLEditorFieldToolbarTest.php
index 2f265ade8..05b4bb77d 100644
--- a/tests/php/Forms/HTMLEditor/HTMLEditorFieldToolbarTest.php
+++ b/tests/php/Forms/HTMLEditor/HTMLEditorFieldToolbarTest.php
@@ -24,7 +24,7 @@ class HTMLEditorFieldToolbarTest extends SapphireTest
return new Toolbar(null, '/');
}
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Forms/SeparatedDateFieldTest.php b/tests/php/Forms/SeparatedDateFieldTest.php
index 1312a5efe..096503f8e 100644
--- a/tests/php/Forms/SeparatedDateFieldTest.php
+++ b/tests/php/Forms/SeparatedDateFieldTest.php
@@ -11,7 +11,7 @@ use SilverStripe\ORM\FieldType\DBDatetime;
class SeparatedDateFieldTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
i18n::set_locale('en_NZ');
diff --git a/tests/php/Forms/TimeFieldTest.php b/tests/php/Forms/TimeFieldTest.php
index 285c440be..58d2e31dc 100644
--- a/tests/php/Forms/TimeFieldTest.php
+++ b/tests/php/Forms/TimeFieldTest.php
@@ -10,7 +10,7 @@ use SilverStripe\i18n\i18n;
class TimeFieldTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
i18n::set_locale('en_NZ');
diff --git a/tests/php/ORM/DBDateTest.php b/tests/php/ORM/DBDateTest.php
index fd38a96ac..cb550e765 100644
--- a/tests/php/ORM/DBDateTest.php
+++ b/tests/php/ORM/DBDateTest.php
@@ -15,7 +15,7 @@ class DBDateTest extends SapphireTest
{
protected $oldError = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->oldError = error_reporting();
@@ -24,7 +24,7 @@ class DBDateTest extends SapphireTest
i18n::set_locale('en_NZ');
}
- public function tearDown()
+ protected function tearDown()
{
$this->restoreNotices();
parent::tearDown();
diff --git a/tests/php/ORM/DBDatetimeTest.php b/tests/php/ORM/DBDatetimeTest.php
index 11422c157..9f3cb8e02 100644
--- a/tests/php/ORM/DBDatetimeTest.php
+++ b/tests/php/ORM/DBDatetimeTest.php
@@ -12,7 +12,7 @@ use SilverStripe\Security\Member;
*/
class DBDatetimeTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
i18n::set_locale('en_NZ');
diff --git a/tests/php/ORM/DBHTMLTextTest.php b/tests/php/ORM/DBHTMLTextTest.php
index 976b8edd8..1958b0b08 100644
--- a/tests/php/ORM/DBHTMLTextTest.php
+++ b/tests/php/ORM/DBHTMLTextTest.php
@@ -14,7 +14,7 @@ use SilverStripe\View\Parsers\ShortcodeParser;
class DBHTMLTextTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -24,7 +24,7 @@ class DBHTMLTextTest extends SapphireTest
ShortcodeParser::set_active('htmltest');
}
- public function tearDown()
+ protected function tearDown()
{
ShortcodeParser::set_active('default');
parent::tearDown();
diff --git a/tests/php/ORM/DBTimeTest.php b/tests/php/ORM/DBTimeTest.php
index d43293baa..64f0640ae 100644
--- a/tests/php/ORM/DBTimeTest.php
+++ b/tests/php/ORM/DBTimeTest.php
@@ -10,7 +10,7 @@ use SilverStripe\Security\Member;
class DBTimeTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
i18n::set_locale('en_NZ');
diff --git a/tests/php/ORM/DataDifferencerTest.php b/tests/php/ORM/DataDifferencerTest.php
index 3601317c0..352c2fe8b 100644
--- a/tests/php/ORM/DataDifferencerTest.php
+++ b/tests/php/ORM/DataDifferencerTest.php
@@ -20,7 +20,7 @@ class DataDifferencerTest extends SapphireTest
DataDifferencerTest\HasOneRelationObject::class
);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -39,7 +39,7 @@ class DataDifferencerTest extends SapphireTest
}
}
- public function tearDown()
+ protected function tearDown()
{
TestAssetStore::reset();
parent::tearDown();
diff --git a/tests/php/ORM/DecimalTest.php b/tests/php/ORM/DecimalTest.php
index 33c322ea3..c402a6ccd 100644
--- a/tests/php/ORM/DecimalTest.php
+++ b/tests/php/ORM/DecimalTest.php
@@ -15,7 +15,7 @@ class DecimalTest extends SapphireTest
DecimalTest\TestObject::class
);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->testDataObject = $this->objFromFixture(DecimalTest\TestObject::class, 'test-dataobject');
diff --git a/tests/php/ORM/ManyManyThroughListTest.php b/tests/php/ORM/ManyManyThroughListTest.php
index b130a913f..6c33b04c1 100644
--- a/tests/php/ORM/ManyManyThroughListTest.php
+++ b/tests/php/ORM/ManyManyThroughListTest.php
@@ -21,13 +21,13 @@ class ManyManyThroughListTest extends SapphireTest
ManyManyThroughListTest\VersionedObject::class,
];
- public function setUp()
+ protected function setUp()
{
parent::setUp();
DataObject::reset();
}
- public function tearDown()
+ protected function tearDown()
{
DataObject::reset();
parent::tearDown();
diff --git a/tests/php/ORM/SQLSelectTest.php b/tests/php/ORM/SQLSelectTest.php
index 4ce183c08..b2cfd14bc 100755
--- a/tests/php/ORM/SQLSelectTest.php
+++ b/tests/php/ORM/SQLSelectTest.php
@@ -23,13 +23,13 @@ class SQLSelectTest extends SapphireTest
protected $oldDeprecation = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->oldDeprecation = Deprecation::dump_settings();
}
- public function tearDown()
+ protected function tearDown()
{
Deprecation::restore_settings($this->oldDeprecation);
parent::tearDown();
diff --git a/tests/php/ORM/Search/FulltextSearchableTest.php b/tests/php/ORM/Search/FulltextSearchableTest.php
index 97145b965..020e62896 100644
--- a/tests/php/ORM/Search/FulltextSearchableTest.php
+++ b/tests/php/ORM/Search/FulltextSearchableTest.php
@@ -11,7 +11,7 @@ use SilverStripe\ORM\Search\FulltextSearchable;
class FulltextSearchableTest extends SapphireTest
{
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -23,7 +23,7 @@ class FulltextSearchableTest 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 tearDown()
+ protected function tearDown()
{
parent::tearDown();
diff --git a/tests/php/ORM/VersionedOwnershipTest.php b/tests/php/ORM/VersionedOwnershipTest.php
index 591901d21..1eea5d069 100644
--- a/tests/php/ORM/VersionedOwnershipTest.php
+++ b/tests/php/ORM/VersionedOwnershipTest.php
@@ -30,7 +30,7 @@ class VersionedOwnershipTest extends SapphireTest
protected static $fixture_file = 'VersionedOwnershipTest.yml';
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Security/BasicAuthTest.php b/tests/php/Security/BasicAuthTest.php
index 1b4514d03..f80019e6f 100644
--- a/tests/php/Security/BasicAuthTest.php
+++ b/tests/php/Security/BasicAuthTest.php
@@ -24,7 +24,7 @@ class BasicAuthTest extends FunctionalTest
ControllerSecuredWithoutPermission::class,
];
- public function setUp()
+ protected function setUp()
{
parent::setUp();
diff --git a/tests/php/Security/MemberAuthenticatorTest.php b/tests/php/Security/MemberAuthenticatorTest.php
index f107d6f27..99c9d214c 100644
--- a/tests/php/Security/MemberAuthenticatorTest.php
+++ b/tests/php/Security/MemberAuthenticatorTest.php
@@ -25,7 +25,7 @@ class MemberAuthenticatorTest extends SapphireTest
protected $defaultUsername = null;
protected $defaultPassword = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -35,7 +35,7 @@ class MemberAuthenticatorTest extends SapphireTest
Security::setDefaultAdmin('admin', 'password');
}
- public function tearDown()
+ protected function tearDown()
{
Security::setDefaultAdmin($this->defaultUsername, $this->defaultPassword);
parent::tearDown();
diff --git a/tests/php/Security/MemberTest.php b/tests/php/Security/MemberTest.php
index 210ef1ccd..157f69f7c 100644
--- a/tests/php/Security/MemberTest.php
+++ b/tests/php/Security/MemberTest.php
@@ -49,7 +49,7 @@ class MemberTest extends FunctionalTest
/**
* @skipUpgrade
*/
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -58,7 +58,7 @@ class MemberTest extends FunctionalTest
Member::set_password_validator(null);
}
- public function tearDown()
+ protected function tearDown()
{
Member::config()->unique_identifier_field = $this->orig['Member_unique_identifier_field'];
parent::tearDown();
diff --git a/tests/php/Security/PasswordEncryptorTest.php b/tests/php/Security/PasswordEncryptorTest.php
index bbdd3ce4d..7f8fa81f1 100644
--- a/tests/php/Security/PasswordEncryptorTest.php
+++ b/tests/php/Security/PasswordEncryptorTest.php
@@ -12,7 +12,7 @@ use SilverStripe\Security\Tests\PasswordEncryptorTest\TestEncryptor;
class PasswordEncryptorTest extends SapphireTest
{
- public function tearDown()
+ protected function tearDown()
{
parent::tearDown();
PasswordEncryptor_Blowfish::set_cost(10);
diff --git a/tests/php/Security/SecurityDefaultAdminTest.php b/tests/php/Security/SecurityDefaultAdminTest.php
index da6680e14..cd18de98c 100644
--- a/tests/php/Security/SecurityDefaultAdminTest.php
+++ b/tests/php/Security/SecurityDefaultAdminTest.php
@@ -15,7 +15,7 @@ class SecurityDefaultAdminTest extends SapphireTest
protected $defaultUsername = null;
protected $defaultPassword = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
@@ -33,7 +33,7 @@ class SecurityDefaultAdminTest extends SapphireTest
Permission::flush_permission_cache();
}
- public function tearDown()
+ protected function tearDown()
{
Security::setDefaultAdmin($this->defaultUsername, $this->defaultPassword);
Permission::flush_permission_cache();
diff --git a/tests/php/Security/SecurityTest.php b/tests/php/Security/SecurityTest.php
index 6fd5ad3f0..15455085b 100644
--- a/tests/php/Security/SecurityTest.php
+++ b/tests/php/Security/SecurityTest.php
@@ -45,7 +45,7 @@ class SecurityTest extends FunctionalTest
SecurityTest\SecuredController::class,
];
- public function setUp()
+ protected function setUp()
{
// This test assumes that MemberAuthenticator is present and the default
$this->priorAuthenticators = Authenticator::get_authenticators();
@@ -70,7 +70,7 @@ class SecurityTest extends FunctionalTest
Config::inst()->update('SilverStripe\\Control\\Director', 'alternate_base_url', '/');
}
- public function tearDown()
+ protected function tearDown()
{
// Restore selected authenticator
diff --git a/tests/php/View/Parsers/ShortcodeParserTest.php b/tests/php/View/Parsers/ShortcodeParserTest.php
index ba4eb6040..b9471317d 100644
--- a/tests/php/View/Parsers/ShortcodeParserTest.php
+++ b/tests/php/View/Parsers/ShortcodeParserTest.php
@@ -11,7 +11,7 @@ class ShortcodeParserTest extends SapphireTest
protected $arguments, $contents, $tagName, $parser;
protected $extra = array();
- public function setUp()
+ protected function setUp()
{
ShortcodeParser::get('test')->register('test_shortcode', array($this, 'shortcodeSaver'));
$this->parser = ShortcodeParser::get('test');
@@ -19,7 +19,7 @@ class ShortcodeParserTest extends SapphireTest
parent::setUp();
}
- public function tearDown()
+ protected function tearDown()
{
ShortcodeParser::get('test')->unregister('test_shortcode');
diff --git a/tests/php/View/RequirementsTest.php b/tests/php/View/RequirementsTest.php
index 10cb0c05b..6208fa3e4 100644
--- a/tests/php/View/RequirementsTest.php
+++ b/tests/php/View/RequirementsTest.php
@@ -20,13 +20,13 @@ class RequirementsTest extends SapphireTest
static $html_template = '';
- public function setUp()
+ protected function setUp()
{
parent::setUp();
TestAssetStore::activate('RequirementsTest'); // Set backend root to /RequirementsTest
}
- public function tearDown()
+ protected function tearDown()
{
TestAssetStore::reset();
parent::tearDown();
diff --git a/tests/php/View/SSViewerTest.php b/tests/php/View/SSViewerTest.php
index 44264e34d..856e86512 100644
--- a/tests/php/View/SSViewerTest.php
+++ b/tests/php/View/SSViewerTest.php
@@ -45,7 +45,7 @@ class SSViewerTest extends SapphireTest
SSViewerTest\TestObject::class,
);
- public function setUp()
+ protected function setUp()
{
parent::setUp();
SSViewer::config()->update('source_file_comments', false);
@@ -54,7 +54,7 @@ class SSViewerTest extends SapphireTest
$this->oldServer = $_SERVER;
}
- public function tearDown()
+ protected function tearDown()
{
$_SERVER = $this->oldServer;
TestAssetStore::reset();
diff --git a/tests/php/i18n/i18nTest.php b/tests/php/i18n/i18nTest.php
index d131e0ba9..0cd2c9703 100644
--- a/tests/php/i18n/i18nTest.php
+++ b/tests/php/i18n/i18nTest.php
@@ -17,13 +17,13 @@ class i18nTest extends SapphireTest
{
use i18nTestManifest;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->setupManifest();
}
- public function tearDown()
+ protected function tearDown()
{
$this->tearDownManifest();
parent::tearDown();
diff --git a/tests/php/i18n/i18nTextCollectorTest.php b/tests/php/i18n/i18nTextCollectorTest.php
index d2a2ba3a3..5478260d1 100644
--- a/tests/php/i18n/i18nTextCollectorTest.php
+++ b/tests/php/i18n/i18nTextCollectorTest.php
@@ -20,7 +20,7 @@ class i18nTextCollectorTest extends SapphireTest
*/
protected $alternateBaseSavePath = null;
- public function setUp()
+ protected function setUp()
{
parent::setUp();
$this->setupManifest();
@@ -29,7 +29,7 @@ class i18nTextCollectorTest extends SapphireTest
Filesystem::makeFolder($this->alternateBaseSavePath);
}
- public function tearDown()
+ protected function tearDown()
{
if (is_dir($this->alternateBaseSavePath)) {
Filesystem::removeFolder($this->alternateBaseSavePath);