mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Implement bootstrap variable homepage customization through plugin system
This commit is contained in:
34
tests/Alchemy/Tests/Phrasea/Utilities/Less/BuilderTest.php
Normal file
34
tests/Alchemy/Tests/Phrasea/Utilities/Less/BuilderTest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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\Compiler;
|
||||
|
||||
use Alchemy\Phrasea\Utilities\Less\Builder;
|
||||
|
||||
class BuilderTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testBuildSuccess()
|
||||
{
|
||||
$compiler = $this->getMockBuilder('Alchemy\Phrasea\Utilities\Less\Compiler')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$compiler->expects($this->once())->method('compile');
|
||||
|
||||
$filesystem = $this->getMock('Symfony\Component\Filesystem\Filesystem');
|
||||
$filesystem->expects($this->once())->method('mkdir');
|
||||
|
||||
$builder = new Builder($compiler, $filesystem);
|
||||
|
||||
$build = $builder->build(array( __FILE__ => __DIR__ . '/output.css'));
|
||||
|
||||
$this->assertTrue($build);
|
||||
}
|
||||
}
|
31
tests/Alchemy/Tests/Phrasea/Utilities/Less/CompilerTest.php
Normal file
31
tests/Alchemy/Tests/Phrasea/Utilities/Less/CompilerTest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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\Compiler;
|
||||
|
||||
use Alchemy\Phrasea\Utilities\Less\Compiler;
|
||||
|
||||
class CompilerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testCompileSuccess()
|
||||
{
|
||||
$recessDriver = $this->getMock('Alchemy\BinaryDriver\BinaryInterface');
|
||||
$recessDriver->expects($this->once())->method('command');
|
||||
|
||||
$filesystem = $this->getMock('Symfony\Component\Filesystem\Filesystem');
|
||||
$filesystem->expects($this->once())->method('mkdir');
|
||||
$filesystem->expects($this->once())->method('dumpFile');
|
||||
|
||||
$compiler = new Compiler($filesystem, $recessDriver);
|
||||
|
||||
$compiler->compile(__DIR__ . '/output.css', __FILE__);
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
<?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