API TestCase classes should be abstract to prevent warnings

This commit is contained in:
Daniel Hensby 2018-03-01 16:42:42 +00:00 committed by Guy Sartorelli
parent 3b758a8a4c
commit 2c102c61a9
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A
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'));