mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Make developer commands runnable without install
This commit is contained in:
@@ -18,7 +18,9 @@ class CompilerTest extends \PhraseanetPHPUnitAbstract
|
||||
{
|
||||
public function testCompileSuccess()
|
||||
{
|
||||
$recessDriver = $this->getMock('Alchemy\BinaryDriver\BinaryInterface');
|
||||
$recessDriver = $this->getMockBuilder('Alchemy\Phrasea\Utilities\Less\RecessDriver')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$recessDriver->expects($this->once())->method('command');
|
||||
|
||||
$filesystem = $this->getMock('Symfony\Component\Filesystem\Filesystem');
|
||||
@@ -30,18 +32,14 @@ class CompilerTest extends \PhraseanetPHPUnitAbstract
|
||||
$compiler->compile(__DIR__ . '/output.css', __FILE__);
|
||||
}
|
||||
|
||||
public function testCreate()
|
||||
{
|
||||
$compiler = Compiler::create(self::$DI['app']);
|
||||
$this->assertInstanceOf('Alchemy\Phrasea\Utilities\Less\Compiler', $compiler);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @expectedException Alchemy\Phrasea\Exception\RuntimeException
|
||||
*/
|
||||
public function testCompileFileNotExists()
|
||||
{
|
||||
$recessDriver = $this->getMock('Alchemy\BinaryDriver\BinaryInterface');
|
||||
$recessDriver = $this->getMockBuilder('Alchemy\Phrasea\Utilities\Less\RecessDriver')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$filesystem = $this->getMock('Symfony\Component\Filesystem\Filesystem');
|
||||
$filesystem->expects($this->once())->method('mkdir');
|
||||
@@ -56,7 +54,10 @@ class CompilerTest extends \PhraseanetPHPUnitAbstract
|
||||
*/
|
||||
public function testCompileExecutionFailure()
|
||||
{
|
||||
$recessDriver = $this->getMock('Alchemy\BinaryDriver\BinaryInterface');
|
||||
$recessDriver = $this->getMockBuilder('Alchemy\Phrasea\Utilities\Less\RecessDriver')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$recessDriver->expects($this->once())->method('command')->will(
|
||||
$this->throwException(new ExecutionFailureException())
|
||||
);
|
||||
|
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Utilities\Less;
|
||||
|
||||
use Alchemy\Phrasea\Utilities\Less\RecessDriver;
|
||||
|
||||
class RecessDriverTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testGetCreate()
|
||||
{
|
||||
$recessDriver = RecessDriver::create();
|
||||
|
||||
$this->assertInstanceOf('Alchemy\BinaryDriver\BinaryInterface', $recessDriver);
|
||||
}
|
||||
|
||||
public function testGetName()
|
||||
{
|
||||
$recessDriver = RecessDriver::create();
|
||||
|
||||
$this->assertEquals('recess', $recessDriver->getName());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user