From a756799ef4df0449244d41c2ecc7133c3fb8ce70 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sat, 26 Mar 2011 17:04:00 +0100 Subject: move setUnittestConfig to TestBaseApi since it makes only sense to use it there --- tests/TestBase.php | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'tests/TestBase.php') diff --git a/tests/TestBase.php b/tests/TestBase.php index b85c189..095f32d 100644 --- a/tests/TestBase.php +++ b/tests/TestBase.php @@ -22,18 +22,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. * @@ -158,38 +146,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 -- cgit v1.2.3-54-g00ecf