Skip to content

Commit

Permalink
MINOR altered skipTest to be a instance property rather than static
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Sep 26, 2011
1 parent 51affd2 commit 37d197c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dev/FunctionalTest.php
Expand Up @@ -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();
Expand Down
7 changes: 3 additions & 4 deletions dev/SapphireTest.php
Expand Up @@ -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
Expand Down Expand Up @@ -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)
));
Expand Down

0 comments on commit 37d197c

Please sign in to comment.