MINOR altered skipTest to be a instance property rather than static

This commit is contained in:
Will Rossiter 2011-09-26 17:11:49 +13:00
parent 51affd2d63
commit 37d197c52f
2 changed files with 4 additions and 5 deletions

View File

@ -58,7 +58,7 @@ class FunctionalTest extends SapphireTest {
function setUp() {
// Skip calling FunctionalTest directly.
if(get_class($this) == "FunctionalTest") self::$skip_test = true;
if(get_class($this) == "FunctionalTest") $this->skipTest = true;
parent::setUp();
$this->mainSession = new TestSession();

View File

@ -24,7 +24,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
*
* @var bool
*/
private static $skip_test = false;
protected $skipTest = false;
/**
* @var Boolean If set to TRUE, this will force a test database to be generated
@ -124,10 +124,9 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
function setUp() {
// We cannot run the tests on this abstract class.
if(get_class($this) == "SapphireTest") self::$skip_test = true;
if(get_class($this) == "SapphireTest") $this->skipTest = true;
// Ensure we are to run this test case
if(self::$skip_test) {
if($this->skipTest) {
$this->markTestSkipped(sprintf(
'Skipping %s ', get_class($this)
));