mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
27 lines
896 B
PHP
27 lines
896 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\Command\Developper\Utils;
|
|
|
|
use Alchemy\Phrasea\Command\Developer\Utils\UglifyJsDriver;
|
|
use Symfony\Component\Process\PhpExecutableFinder;
|
|
|
|
class UglifyJsDriverTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testCreate()
|
|
{
|
|
$driver = UglifyJsDriver::create();
|
|
$this->assertInstanceOf('Alchemy\Phrasea\Command\Developer\Utils\UglifyJsDriver', $driver);
|
|
$this->assertEquals('uglifyjs', $driver->getName());
|
|
}
|
|
|
|
public function testCreateWithCustomBinary()
|
|
{
|
|
$finder = new PhpExecutableFinder();
|
|
$php = $finder->find();
|
|
|
|
$driver = UglifyJsDriver::create(array('uglifyjs.binaries' => $php));
|
|
$this->assertInstanceOf('Alchemy\Phrasea\Command\Developer\Utils\UglifyJsDriver', $driver);
|
|
$this->assertEquals($php, $driver->getProcessBuilderFactory()->getBinary());
|
|
}
|
|
}
|