diff --git a/src/ClosureCompiler/ClosureCompiler.php b/src/ClosureCompiler/ClosureCompiler.php index 114aa0a..7c1c193 100644 --- a/src/ClosureCompiler/ClosureCompiler.php +++ b/src/ClosureCompiler/ClosureCompiler.php @@ -186,11 +186,7 @@ class ClosureCompiler public function setTargetFile($file) { $path = $this->config['targetBaseDir'] . $file; - if (file_exists($path)) { - $this->config['targetFileName'] = $path; - } else { - throw new CompilerException("The path '{$path}' does not seem to exist."); - } + $this->config['targetFileName'] = $path; } /** diff --git a/tests/closureCompilerTest.php b/tests/closureCompilerTest.php index 4f26820..80a5272 100644 --- a/tests/closureCompilerTest.php +++ b/tests/closureCompilerTest.php @@ -208,13 +208,12 @@ class closureCompilerTest extends PHPUnit_Framework_TestCase /** * @covers Devize\ClosureCompiler\ClosureCompiler::setTargetFile - * @expectedException Devize\ClosureCompiler\CompilerException - * @expectedExceptionMessage The path 'test.js' does not seem to exist. */ public function testSetTargetFile1() { $this->object->setTargetFile('test.js'); - + $result = $this->object->getConfig(); + $this->assertEquals($result['targetBaseDir'] . 'test.js', $result['targetFileName']); } /**