mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 22:13:13 +00:00
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Phraseanet
|
|
*
|
|
* (c) 2005-2010 Alchemy
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
require_once __DIR__ . '/../../../../PhraseanetPHPUnitAbstract.class.inc';
|
|
|
|
/**
|
|
*
|
|
* @package
|
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
|
* @link www.phraseanet.com
|
|
*/
|
|
class CacheBuilderTest extends PhraseanetPHPUnitAbstract
|
|
{
|
|
|
|
public function testCreateException()
|
|
{
|
|
$configuration = new Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(
|
|
array("type" => "unknow")
|
|
);
|
|
|
|
try
|
|
{
|
|
$service = Alchemy\Phrasea\Core\Service\Builder::create(self::$core, $configuration);
|
|
$this->fail("An exception should be raised");
|
|
}
|
|
catch (\Exception $e)
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
public function testCreate()
|
|
{
|
|
$configuration = new Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(
|
|
array("type" => "Cache\\ArrayCache")
|
|
);
|
|
|
|
$service = Alchemy\Phrasea\Core\Service\Builder::create(self::$core, $configuration);
|
|
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
|
}
|
|
|
|
}
|