diff options
author | Christian Weiske <cweiske@cweiske.de> | 2011-04-06 08:43:42 +0200 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2011-04-06 08:43:42 +0200 |
commit | cba0776325ac82bc255feb9a44b3bf312b02f6dc (patch) | |
tree | d902b2f9fa462d76421c0938357a8bf4cd6f0f5c /tests/TestBase.php | |
parent | c81566f5d8c6149e87432b158331fd724e7e35e5 (diff) | |
download | semanticscuttle-cba0776325ac82bc255feb9a44b3bf312b02f6dc.tar.gz semanticscuttle-cba0776325ac82bc255feb9a44b3bf312b02f6dc.tar.bz2 |
cherry-pick:
move setUnittestConfig to TestBaseApi since it makes only sense to use it there
Conflicts:
tests/TestBaseApi.php
Diffstat (limited to 'tests/TestBase.php')
-rw-r--r-- | tests/TestBase.php | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/TestBase.php b/tests/TestBase.php index edafd3d..5a61b7b 100644 --- a/tests/TestBase.php +++ b/tests/TestBase.php @@ -23,18 +23,6 @@ class TestBase extends PHPUnit_Framework_TestCase { /** - * Clean up after test - */ - public function tearDown() - { - if (file_exists($GLOBALS['datadir'] . '/config.unittest.php')) { - unlink($GLOBALS['datadir'] . '/config.unittest.php'); - } - } - - - - /** * Create a new bookmark. * * @param integer $user User ID the bookmark shall belong @@ -157,38 +145,6 @@ class TestBase extends PHPUnit_Framework_TestCase return $uid; } - - - /** - * Writes a special unittest configuration file. - * The unittest config file is read when a GET request with unittestMode=1 - * is sent, and the user allowed unittestmode in config.php. - * - * @param array $arConfig Array with config names as key and their value as - * value - * - * @return void - */ - protected function setUnittestConfig($arConfig) - { - $str = '<' . "?php\r\n"; - foreach ($arConfig as $name => $value) { - $str .= '$' . $name . ' = ' - . var_export($value, true) . ";\n"; - } - - if (!is_dir($GLOBALS['datadir'])) { - $this->fail( - 'datadir not set or not a directory: ' . $GLOBALS['datadir'] - ); - } - - $this->assertInternalType( - 'integer', - file_put_contents($GLOBALS['datadir'] . '/config.unittest.php', $str), - 'Writing config.unittest.php failed' - ); - } } ?>
\ No newline at end of file |