Merge pull request #10461 from creative-commoners/pulls/5/rescue-master-abstract-testcase

API Rescue Master Branch PR: TestCase classes should be abstract to prevent warnings
This commit is contained in:
Steve Boyd 2022-08-24 15:37:18 +12:00 committed by GitHub
commit feb57dbf1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -31,7 +31,7 @@ use SimpleXMLElement;
* }
* </code>
*/
class FunctionalTest extends SapphireTest implements TestOnly
abstract class FunctionalTest extends SapphireTest implements TestOnly
{
/**
* Set this to true on your sub-class to disable the use of themes in this test.

View File

@ -48,7 +48,7 @@ use SilverStripe\View\SSViewer;
* This class should not be used anywhere outside of unit tests, as phpunit may not be installed
* in production sites.
*/
class SapphireTest extends TestCase implements TestOnly
abstract class SapphireTest extends TestCase implements TestOnly
{
/**
* Path to fixture data for this test run.
@ -274,11 +274,6 @@ class SapphireTest extends TestCase implements TestOnly
// Call state helpers
static::$state->setUp($this);
// We cannot run the tests on this abstract class.
if (static::class == __CLASS__) {
$this->markTestSkipped(sprintf('Skipping %s ', static::class));
}
// i18n needs to be set to the defaults or tests fail
if (class_exists(i18n::class)) {
i18n::set_locale(i18n::config()->uninherited('default_locale'));