mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
36 lines
948 B
PHP
36 lines
948 B
PHP
<?php
|
|
|
|
use Alchemy\Phrasea\Application;
|
|
use Alchemy\Phrasea\Core\Service\Builder;
|
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
|
|
|
|
require_once __DIR__ . '/../../../../PhraseanetPHPUnitAbstract.class.inc';
|
|
|
|
class CacheBuilderTest extends PhraseanetPHPUnitAbstract
|
|
{
|
|
|
|
public function testCreateException()
|
|
{
|
|
$configuration = new ParameterBag(
|
|
array("type" => "unknow")
|
|
);
|
|
|
|
try {
|
|
$service = Builder::create(self::$DI['app'], $configuration);
|
|
$this->fail("An exception should be raised");
|
|
} catch (\Exception $e) {
|
|
|
|
}
|
|
}
|
|
|
|
public function testCreate()
|
|
{
|
|
$configuration = new ParameterBag(
|
|
array("type" => "Cache\\ArrayCache")
|
|
);
|
|
|
|
$service = Builder::create(self::$DI['app'], $configuration);
|
|
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
|
}
|
|
}
|