From 2c102c61a9d5837dc74fd731c92df4dc3834d37e Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Thu, 1 Mar 2018 16:42:42 +0000 Subject: [PATCH] API TestCase classes should be abstract to prevent warnings --- src/Dev/FunctionalTest.php | 2 +- src/Dev/SapphireTest.php | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Dev/FunctionalTest.php b/src/Dev/FunctionalTest.php index 90a47bedc..56a4e7334 100644 --- a/src/Dev/FunctionalTest.php +++ b/src/Dev/FunctionalTest.php @@ -31,7 +31,7 @@ use SimpleXMLElement; * } * */ -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. diff --git a/src/Dev/SapphireTest.php b/src/Dev/SapphireTest.php index aed11730a..965111b12 100644 --- a/src/Dev/SapphireTest.php +++ b/src/Dev/SapphireTest.php @@ -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'));