summaryrefslogtreecommitdiff
path: root/tests/test_tools/simpletest/invoker.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2016-03-25 17:55:51 +0100
committerFabio Bas <ctrlaltca@gmail.com>2016-03-25 17:55:51 +0100
commita3388622287e218beddfa14a47ed677d4307b36b (patch)
tree1b4c7ac8597b1cc798b6683d4a81c90d38de12f6 /tests/test_tools/simpletest/invoker.php
parentc7fd3e1167b6f2fa7746edbd0fb8f8c1694c61f9 (diff)
Removed simpletest and moved all tests in the unit tree
Tests are executed now, but a lot of them need fixing.
Diffstat (limited to 'tests/test_tools/simpletest/invoker.php')
-rw-r--r--tests/test_tools/simpletest/invoker.php138
1 files changed, 0 insertions, 138 deletions
diff --git a/tests/test_tools/simpletest/invoker.php b/tests/test_tools/simpletest/invoker.php
deleted file mode 100644
index dfe9263c..00000000
--- a/tests/test_tools/simpletest/invoker.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
- /**
- * Base include file for SimpleTest
- * @package SimpleTest
- * @subpackage UnitTester
- * @version $Id: invoker.php 1398 2006-09-08 19:31:03Z xue $
- */
-
- /**#@+
- * Includes SimpleTest files and defined the root constant
- * for dependent libraries.
- */
- require_once(dirname(__FILE__) . '/errors.php');
- require_once(dirname(__FILE__) . '/compatibility.php');
- require_once(dirname(__FILE__) . '/scorer.php');
- require_once(dirname(__FILE__) . '/expectation.php');
- require_once(dirname(__FILE__) . '/dumper.php');
- if (! defined('SIMPLE_TEST')) {
- define('SIMPLE_TEST', dirname(__FILE__) . '/');
- }
- /**#@-*/
-
- /**
- * This is called by the class runner to run a
- * single test method. Will also run the setUp()
- * and tearDown() methods.
- * @package SimpleTest
- * @subpackage UnitTester
- */
- class SimpleInvoker {
- protected $_test_case;
-
- /**
- * Stashes the test case for later.
- * @param SimpleTestCase $test_case Test case to run.
- */
- function SimpleInvoker($test_case) {
- $this->_test_case = $test_case;
- }
-
- /**
- * Accessor for test case being run.
- * @return SimpleTestCase Test case.
- * @access public
- */
- function &getTestCase() {
- return $this->_test_case;
- }
-
- /**
- * Runs test level set up. Used for changing
- * the mechanics of base test cases.
- * @param string $method Test method to call.
- * @access public
- */
- function before($method) {
- $this->_test_case->before($method);
- }
-
- /**
- * Invokes a test method and buffered with setUp()
- * and tearDown() calls.
- * @param string $method Test method to call.
- * @access public
- */
- function invoke($method) {
- $this->_test_case->setUp();
- $this->_test_case->$method();
- $this->_test_case->tearDown();
- }
-
- /**
- * Runs test level clean up. Used for changing
- * the mechanics of base test cases.
- * @param string $method Test method to call.
- * @access public
- */
- function after($method) {
- $this->_test_case->after($method);
- }
- }
-
- /**
- * Do nothing decorator. Just passes the invocation
- * straight through.
- * @package SimpleTest
- * @subpackage UnitTester
- */
- class SimpleInvokerDecorator {
- protected $_invoker;
-
- /**
- * Stores the invoker to wrap.
- * @param SimpleInvoker $invoker Test method runner.
- */
- function SimpleInvokerDecorator($invoker) {
- $this->_invoker = $invoker;
- }
-
- /**
- * Accessor for test case being run.
- * @return SimpleTestCase Test case.
- * @access public
- */
- function &getTestCase() {
- return $this->_invoker->getTestCase();
- }
-
- /**
- * Runs test level set up. Used for changing
- * the mechanics of base test cases.
- * @param string $method Test method to call.
- * @access public
- */
- function before($method) {
- $this->_invoker->before($method);
- }
-
- /**
- * Invokes a test method and buffered with setUp()
- * and tearDown() calls.
- * @param string $method Test method to call.
- * @access public
- */
- function invoke($method) {
- $this->_invoker->invoke($method);
- }
-
- /**
- * Runs test level clean up. Used for changing
- * the mechanics of base test cases.
- * @param string $method Test method to call.
- * @access public
- */
- function after($method) {
- $this->_invoker->after($method);
- }
- }