This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Component/Templating/Loader/LoaderTest.php
Fabien Potencier 055b6e4d6e made a big refactoring of the templating sub-framework
* better separation of concerns
 * made TwigBundle independant of the PHP Engine from FrameworkBundle (WIP)
 * removed one layer of abstraction in the Templating component (renderers)
 * made it easier to create a new Engine for any templating library
 * made engines lazy-loaded (PHP engine for instance is not started if you only use Twig)
 * reduces memory footprint (if you only use one engine)
 * reduces size of compiled classes.php cache file
2011-01-15 07:43:05 +01:00

45 lines
1.1 KiB
PHP

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Tests\Component\Templating\Loader;
require_once __DIR__.'/../Fixtures/ProjectTemplateDebugger.php';
use Symfony\Component\Templating\Loader\Loader;
use Symfony\Component\Templating\TemplateNameParser;
class LoaderTest extends \PHPUnit_Framework_TestCase
{
public function testGetSetDebugger()
{
$loader = new ProjectTemplateLoader4(new TemplateNameParser());
$loader->setDebugger($debugger = new \ProjectTemplateDebugger());
$this->assertTrue($loader->getDebugger() === $debugger, '->setDebugger() sets the debugger instance');
}
}
class ProjectTemplateLoader4 extends Loader
{
public function load($template)
{
}
public function getDebugger()
{
return $this->debugger;
}
public function isFresh($template, $time)
{
return false;
}
}