From bdebe6598c52a74f7040e3a11198b3554fa58f54 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 12 Apr 2011 09:29:59 +0200 Subject: use bootstrap file declared in phpunit.xml and do not include it in every single test file. also get rid of the PHPUnit_MAIN_METHOD declarations since using phpunit directly is preferred --- tests/ajax/GetAdminLinkedTagsTest.php | 26 -------------------------- tests/ajax/GetAdminTagsTest.php | 2 -- tests/ajax/GetContactTagsTest.php | 2 -- 3 files changed, 30 deletions(-) (limited to 'tests/ajax') diff --git a/tests/ajax/GetAdminLinkedTagsTest.php b/tests/ajax/GetAdminLinkedTagsTest.php index aded834..43cb17a 100644 --- a/tests/ajax/GetAdminLinkedTagsTest.php +++ b/tests/ajax/GetAdminLinkedTagsTest.php @@ -12,14 +12,8 @@ * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ - -require_once dirname(__FILE__) . '/../prepare.php'; require_once 'HTTP/Request2.php'; -if (!defined('PHPUnit_MAIN_METHOD')) { - define('PHPUnit_MAIN_METHOD', 'ajax_GetAdminLinkedTagsTest::main'); -} - /** * Unit tests for the ajax linked admin tags script * @@ -34,22 +28,6 @@ class ajax_GetAdminLinkedTagsTest extends TestBaseApi protected $urlPart = 'ajax/getadminlinkedtags.php'; - - /** - * Used to run this test class standalone - * - * @return void - */ - public static function main() - { - require_once 'PHPUnit/TextUI/TestRunner.php'; - PHPUnit_TextUI_TestRunner::run( - new PHPUnit_Framework_TestSuite(__CLASS__) - ); - } - - - /** * Verify that we get the configured root tags if * we do not pass any parameters @@ -139,8 +117,4 @@ class ajax_GetAdminLinkedTagsTest extends TestBaseApi $this->assertEquals('adminsubtag', $data[0]->data->title); } } - -if (PHPUnit_MAIN_METHOD == 'ajax_GetAdminLinkedTagsTest::main') { - ajax_GetAdminLinkedTagsTest::main(); -} ?> \ No newline at end of file diff --git a/tests/ajax/GetAdminTagsTest.php b/tests/ajax/GetAdminTagsTest.php index 80d702f..8bf8a83 100644 --- a/tests/ajax/GetAdminTagsTest.php +++ b/tests/ajax/GetAdminTagsTest.php @@ -12,8 +12,6 @@ * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ - -require_once dirname(__FILE__) . '/../prepare.php'; require_once 'HTTP/Request2.php'; /** diff --git a/tests/ajax/GetContactTagsTest.php b/tests/ajax/GetContactTagsTest.php index 559040f..268ed66 100644 --- a/tests/ajax/GetContactTagsTest.php +++ b/tests/ajax/GetContactTagsTest.php @@ -12,8 +12,6 @@ * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ - -require_once dirname(__FILE__) . '/../prepare.php'; require_once 'HTTP/Request2.php'; /** -- cgit v1.2.3