Skip to content

Commit

Permalink
added a skip for incorrect uglifyjs version
Browse files Browse the repository at this point in the history
  • Loading branch information
kriswallsmith committed Jan 9, 2013
1 parent 8f41864 commit ba1905e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Assetic/Test/Filter/UglifyJsFilterTest.php
Expand Up @@ -13,6 +13,7 @@

use Assetic\Asset\FileAsset;
use Assetic\Filter\UglifyJsFilter;
use Symfony\Component\Process\ProcessBuilder;

/**
* @group integration
Expand All @@ -30,6 +31,16 @@ protected function setUp()
$this->markTestSkipped('Unable to find `uglifyjs` executable.');
}

// verify uglifyjs version
$pb = new ProcessBuilder($nodeBin ? array($nodeBin, $uglifyjsBin) : array($uglifyjsBin));
$pb->add('--version');
if (isset($_SERVER['NODE_PATH'])) {
$pb->setEnv('NODE_PATH', $_SERVER['NODE_PATH']);
}
if (0 === $pb->getProcess()->run()) {
$this->markTestSkipped('Incorrect version of UglifyJs');
}

$this->asset = new FileAsset(__DIR__.'/fixtures/uglifyjs/script.js');
$this->asset->load();

Expand Down

0 comments on commit ba1905e

Please sign in to comment.