diff options
Diffstat (limited to 'application/tests/Test.php')
-rw-r--r-- | application/tests/Test.php | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/application/tests/Test.php b/application/tests/Test.php index 1f2e4fefa..b9f401bdf 100644 --- a/application/tests/Test.php +++ b/application/tests/Test.php @@ -9,14 +9,27 @@ namespace tests; +require_once APPPATH."/third_party/test-more-php/Test-More-OO.php"; + +class TestMore extends \TestMore { + private $TestNamePrefix = ""; + + public function setTestNamePrefix($prefix) { + $this->TestNamePrefix = $prefix; + } + + public function ok ($Result = NULL, $TestName = NULL) { + return parent::ok($Result, $this->TestNamePrefix.$TestName); + } +} + abstract class Test { protected $t; protected $server = ""; public function __construct() { - require_once APPPATH."/third_party/test-more-php/Test-More-OO.php"; - $this->t = new \TestMore(); + $this->t = new TestMore(); $this->t->plan("no_plan"); } @@ -106,4 +119,8 @@ abstract class Test { { $this->t->done_testing(); } + + public function setTestNamePrefix($prefix) { + $this->t->setTestNamePrefix($prefix); + } } |