From 37d197c52ff4713e943a24e2fc47971d05ca842d Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Mon, 26 Sep 2011 17:11:49 +1300 Subject: [PATCH] MINOR altered skipTest to be a instance property rather than static --- dev/FunctionalTest.php | 2 +- dev/SapphireTest.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dev/FunctionalTest.php b/dev/FunctionalTest.php index 459fdf24d1d..3dc9e2cbdbc 100644 --- a/dev/FunctionalTest.php +++ b/dev/FunctionalTest.php @@ -58,7 +58,7 @@ function session() { 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(); diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 43c20f7c7bb..6c6798af380 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -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 @@ public static function is_running_test() { 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) ));