1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-09 23:56:43 +02:00

YUI/Closure: mark test skipped if .jar not found

This commit is contained in:
Elan Ruusamäe
2015-11-19 11:31:29 +02:00
committed by Steve Clay
parent e328c0b4af
commit ed79a279a9
2 changed files with 11 additions and 3 deletions

View File

@@ -71,6 +71,10 @@ class MinifyClosureCompilerTest extends TestCase
protected function assertHasJar() protected function assertHasJar()
{ {
$this->assertNotEmpty(Minify_ClosureCompiler::$jarFile); $this->assertNotEmpty(Minify_ClosureCompiler::$jarFile);
try {
$this->assertFileExists(Minify_ClosureCompiler::$jarFile, "Have closure compiler compiler.jar"); $this->assertFileExists(Minify_ClosureCompiler::$jarFile, "Have closure compiler compiler.jar");
} catch (Exception $e) {
$this->markTestSkipped($e->getMessage());
}
} }
} }

View File

@@ -47,7 +47,11 @@ class MinifyYuiCSSTest extends TestCase
protected function assertHasJar() protected function assertHasJar()
{ {
$this->assertNotEmpty(Minify_YUICompressor::$jarFile ); $this->assertNotEmpty(Minify_YUICompressor::$jarFile);
try {
$this->assertFileExists(Minify_YUICompressor::$jarFile , "Have YUI yuicompressor.jar"); $this->assertFileExists(Minify_YUICompressor::$jarFile , "Have YUI yuicompressor.jar");
} catch (Exception $e) {
$this->markTestSkipped($e->getMessage());
}
} }
} }