1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-18 03:41:35 +02:00

moved tests to minify\test namespace

This commit is contained in:
Elan Ruusamäe
2017-12-22 18:04:34 +02:00
parent 7d60fb9d0f
commit 9ee5fb7701
22 changed files with 107 additions and 36 deletions

View File

@@ -1,6 +1,9 @@
<?php
use Minify\Test\TestCase;
namespace Minify\Test;
use Minify_JS_ClosureCompiler;
use Minify_JS_ClosureCompiler_Exception;
class JsClosureCompilerTest extends TestCase
{
@@ -29,7 +32,8 @@ class JsClosureCompilerTest extends TestCase
$this->compile($src);
} catch (Minify_JS_ClosureCompiler_Exception $e) {
}
$this->assertInstanceOf('Minify_JS_ClosureCompiler_Exception', $e, 'Throws Minify_JS_ClosureCompiler_Exception');
$this->assertInstanceOf('Minify_JS_ClosureCompiler_Exception', $e,
'Throws Minify_JS_ClosureCompiler_Exception');
}
// Test maximum byte size check (default)
@@ -42,7 +46,8 @@ class JsClosureCompilerTest extends TestCase
$this->compile($src);
} catch (Minify_JS_ClosureCompiler_Exception $e) {
}
$this->assertInstanceOf('Minify_JS_ClosureCompiler_Exception', $e, 'Throws Minify_JS_ClosureCompiler_Exception');
$this->assertInstanceOf('Minify_JS_ClosureCompiler_Exception', $e,
'Throws Minify_JS_ClosureCompiler_Exception');
$expected = 'POST content larger than ' . Minify_JS_ClosureCompiler::DEFAULT_MAX_BYTES . ' bytes';
$this->assertEquals($expected, $e->getMessage(), 'Message must tell how big maximum byte size is');
@@ -71,7 +76,8 @@ class JsClosureCompilerTest extends TestCase
));
} catch (Minify_JS_ClosureCompiler_Exception $e) {
}
$this->assertInstanceOf('Minify_JS_ClosureCompiler_Exception', $e, 'Throws Minify_JS_ClosureCompiler_Exception');
$this->assertInstanceOf('Minify_JS_ClosureCompiler_Exception', $e,
'Throws Minify_JS_ClosureCompiler_Exception');
$expected = 'POST content larger than ' . $allowedBytes . ' bytes';
$this->assertEquals($expected, $e->getMessage(), 'Message must tell how big maximum byte size is');
@@ -90,7 +96,8 @@ class JsClosureCompilerTest extends TestCase
));
} catch (Minify_JS_ClosureCompiler_Exception $e) {
}
$this->assertInstanceOf('Minify_JS_ClosureCompiler_Exception', $e, 'Throws Minify_JS_ClosureCompiler_Exception');
$this->assertInstanceOf('Minify_JS_ClosureCompiler_Exception', $e,
'Throws Minify_JS_ClosureCompiler_Exception');
}
public function test7()