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

46 lines
1.2 KiB
PHP
Raw Normal View History

2010-01-04 14:26:20 +00:00
<?php
/*
2010-04-25 16:06:54 +01:00
* This file is part of the Symfony package.
2010-01-04 14:26:20 +00:00
*
* (c) Fabien Potencier <fabien@symfony.com>
2010-04-07 02:07:59 +01:00
*
2010-01-04 14:26:20 +00:00
* 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;
2010-06-28 08:31:54 +01:00
require_once __DIR__.'/../Fixtures/ProjectTemplateDebugger.php';
2010-01-04 14:26:20 +00:00
use Symfony\Component\Templating\Loader\Loader;
2011-02-27 18:34:02 +00:00
use Symfony\Component\Templating\TemplateNameParser;
2011-02-10 17:20:44 +00:00
use Symfony\Component\Templating\TemplateReferenceInterface;
2010-01-04 14:26:20 +00:00
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');
}
}
2010-01-04 14:26:20 +00:00
class ProjectTemplateLoader4 extends Loader
2010-01-04 14:26:20 +00:00
{
2011-02-10 17:20:44 +00:00
public function load(TemplateReferenceInterface $template)
{
}
2010-01-04 14:26:20 +00:00
public function getDebugger()
{
return $this->debugger;
}
2011-02-10 17:20:44 +00:00
public function isFresh(TemplateReferenceInterface $template, $time)
{
return false;
}
2010-01-04 14:26:20 +00:00
}