mirror of
https://github.com/mrclay/minify.git
synced 2025-08-06 22:26:28 +02:00
add common TestCase class
This commit is contained in:
committed by
Steve Clay
parent
08070aecdb
commit
4bfe976916
@@ -19,6 +19,9 @@
|
||||
"autoload": {
|
||||
"classmap": ["lib/"]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": ["tests/TestCase.php"]
|
||||
},
|
||||
"require": {
|
||||
"ext-pcre": "*",
|
||||
"firephp/firephp-core": "~0.4.0",
|
||||
|
@@ -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');
|
||||
|
12
tests/TestCase.php
Normal file
12
tests/TestCase.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
class TestCase extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/** @var string */
|
||||
protected static $test_files;
|
||||
|
||||
public static function setupBeforeClass()
|
||||
{
|
||||
self::$test_files = __DIR__ . '/../min_unit_tests/_test_files';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user