From 4bfe976916fde567a754be1f12ba3eada67073e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 18 Nov 2015 17:17:43 +0200 Subject: [PATCH] add common TestCase class --- composer.json | 3 +++ tests/JSMinTest.php | 10 +--------- tests/TestCase.php | 12 ++++++++++++ 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 tests/TestCase.php diff --git a/composer.json b/composer.json index 122a90a..a6f8553 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,9 @@ "autoload": { "classmap": ["lib/"] }, + "autoload-dev": { + "classmap": ["tests/TestCase.php"] + }, "require": { "ext-pcre": "*", "firephp/firephp-core": "~0.4.0", diff --git a/tests/JSMinTest.php b/tests/JSMinTest.php index 70e03a9..aa686da 100644 --- a/tests/JSMinTest.php +++ b/tests/JSMinTest.php @@ -2,16 +2,8 @@ use JSMin\JSMin; -class JsMinTest extends PHPUnit_Framework_TestCase +class JsMinTest extends TestCase { - /** @var string */ - static $test_files; - - public static function setupBeforeClass() - { - self::$test_files = __DIR__ . '/../min_unit_tests/_test_files'; - } - public function test1() { $src = file_get_contents(self::$test_files . '/js/before.js'); diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..e1ecd41 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,12 @@ +