Fix unit tests

This commit is contained in:
Romain Neutron
2014-02-20 12:34:53 +01:00
parent ad34bfa854
commit 25073721c8
10 changed files with 49 additions and 47 deletions

View File

@@ -3,13 +3,16 @@
namespace Alchemy\Tests\Phrasea\Command\Developper\Utils;
use Alchemy\Phrasea\Command\Developer\Utils\GruntDriver;
use Alchemy\Phrasea\Core\CLIProvider\CLIDriversServiceProvider;
use Symfony\Component\Process\PhpExecutableFinder;
class GruntDriverTest extends \PhraseanetTestCase
{
public function testCreate()
{
$driver = GruntDriver::create();
$app = self::$DI['app'];
$app->register(new CLIDriversServiceProvider());
$driver = GruntDriver::create(['grunt.binaries' => $app['driver.binary-finder']('grunt', 'grunt_binary')]);
$this->assertInstanceOf('Alchemy\Phrasea\Command\Developer\Utils\GruntDriver', $driver);
$this->assertEquals('grunt', $driver->getName());
}

View File

@@ -3,13 +3,16 @@
namespace Alchemy\Tests\Phrasea\Command\Developper\Utils;
use Alchemy\Phrasea\Command\Developer\Utils\UglifyJsDriver;
use Alchemy\Phrasea\Core\CLIProvider\CLIDriversServiceProvider;
use Symfony\Component\Process\PhpExecutableFinder;
class UglifyJsDriverTest extends \PhraseanetTestCase
{
public function testCreate()
{
$driver = UglifyJsDriver::create();
$app = self::$DI['app'];
$app->register(new CLIDriversServiceProvider());
$driver = UglifyJsDriver::create(['uglifyjs.binaries' => $app['driver.binary-finder']('uglifyjs', 'uglifyjs_binary')]);
$this->assertInstanceOf('Alchemy\Phrasea\Command\Developer\Utils\UglifyJsDriver', $driver);
$this->assertEquals('uglifyjs', $driver->getName());
}