mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Removed obsolete TestRunner->$skipTests flag
Taken care of by the default PHPUnit implementation of markTestSkipped()
This commit is contained in:
parent
d1af214ef5
commit
589fee1a8a
@ -76,7 +76,9 @@ class FunctionalTest extends SapphireTest {
|
||||
|
||||
public function setUp() {
|
||||
// Skip calling FunctionalTest directly.
|
||||
if(get_class($this) == "FunctionalTest") $this->skipTest = true;
|
||||
if(get_class($this) == "FunctionalTest") {
|
||||
$this->markTestSkipped(sprintf('Skipping %s ', get_class($this)));
|
||||
}
|
||||
|
||||
parent::setUp();
|
||||
$this->mainSession = new TestSession();
|
||||
|
@ -29,11 +29,6 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
*/
|
||||
protected $fixtureFactory;
|
||||
|
||||
/**
|
||||
* @var bool Set whether to include this test in the TestRunner or to skip this.
|
||||
*/
|
||||
protected $skipTest = false;
|
||||
|
||||
/**
|
||||
* @var Boolean If set to TRUE, this will force a test database to be generated
|
||||
* in {@link setUp()}. Note that this flag is overruled by the presence of a
|
||||
@ -183,13 +178,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
$this->originalReadingMode = \Versioned::get_reading_mode();
|
||||
|
||||
// We cannot run the tests on this abstract class.
|
||||
if(get_class($this) == "SapphireTest") $this->skipTest = true;
|
||||
|
||||
if($this->skipTest) {
|
||||
$this->markTestSkipped(sprintf(
|
||||
'Skipping %s ', get_class($this)
|
||||
));
|
||||
|
||||
if(get_class($this) == "SapphireTest") {
|
||||
$this->markTestSkipped(sprintf('Skipping %s ', get_class($this)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
* Moved test database cleanup task from `sake dev/tests/cleanupdb` to `sake dev/tasks/CleanupTestDatabasesTask`
|
||||
* Removed `TestRunner` and `JSTestRunner` APIs
|
||||
* Removed `PhpUnitWrapper`, `PhpUnitWrapper_3_4`, `PhpUnitWrapper_3_5`, `PhpUnitWrapper_Generic`, `SapphireTestSuite` APIs
|
||||
* Removed `SapphireTest->skipTest`, use `markTestSkipped()` in a `setUp()` method instead
|
||||
* `HtmlEditorConfig` is now an abstract class, with a default implementation `TinyMCEConfig` for the built in
|
||||
TinyMCE editor.
|
||||
* `HtmlEditorField::setEditorConfig` may now take an instance of a `HtmlEditorConfig` class, as well as a
|
||||
|
@ -70,7 +70,6 @@ class ErrorControlChainTest extends SapphireTest {
|
||||
|
||||
if ($rv != 0) {
|
||||
$this->markTestSkipped("Can't run PHP from the command line - is it in your path?");
|
||||
$this->skipTest = true;
|
||||
}
|
||||
|
||||
parent::setUp();
|
||||
|
@ -3,15 +3,11 @@
|
||||
class GDImageTest extends ImageTest {
|
||||
|
||||
public function setUp() {
|
||||
$skip = !extension_loaded("gd");
|
||||
if($skip) {
|
||||
$this->skipTest = true;
|
||||
}
|
||||
|
||||
parent::setUp();
|
||||
|
||||
if($skip) {
|
||||
if(!extension_loaded("gd")) {
|
||||
$this->markTestSkipped("The GD extension is required");
|
||||
return;
|
||||
}
|
||||
|
||||
Config::inst()->update('Injector', 'Image_Backend', 'GDBackend');
|
||||
|
@ -15,13 +15,11 @@ class ImageTest extends SapphireTest {
|
||||
protected static $fixture_file = 'ImageTest.yml';
|
||||
|
||||
public function setUp() {
|
||||
if(get_class($this) == "ImageTest") {
|
||||
$this->skipTest = true;
|
||||
}
|
||||
|
||||
parent::setUp();
|
||||
|
||||
if($this->skipTest) {
|
||||
// Execute specific subclass
|
||||
if(get_class($this) == "ImageTest") {
|
||||
$this->markTestSkipped(sprintf('Skipping %s ', get_class($this)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,12 @@
|
||||
<?php
|
||||
class ImagickImageTest extends ImageTest {
|
||||
public function setUp() {
|
||||
$skip = !extension_loaded("imagick");
|
||||
if($skip) {
|
||||
$this->skipTest = true;
|
||||
}
|
||||
|
||||
parent::setUp();
|
||||
|
||||
if($skip) {
|
||||
$this->markTestSkipped("The Imagick extension is not available.");
|
||||
}
|
||||
|
||||
if(!extension_loaded("imagick")) {
|
||||
$this->markTestSkipped("The Imagick extension is not available.");
|
||||
return;
|
||||
}
|
||||
|
||||
Config::inst()->update('Injector', 'Image_Backend', 'ImagickBackend');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user