ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
FactoryRuntimeLoaderTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of Twig.
5  *
6  * (c) Fabien Potencier
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
12 class Twig_Tests_FactoryRuntimeLoaderTest extends \PHPUnit\Framework\TestCase
13 {
14  public function testLoad()
15  {
16  $loader = new Twig_FactoryRuntimeLoader(array('stdClass' => 'getRuntime'));
17 
18  $this->assertInstanceOf('stdClass', $loader->load('stdClass'));
19  }
20 
22  {
24 
25  $this->assertNull($loader->load('stdClass'));
26  }
27 }
28 
29 function getRuntime()
30 {
31  return new stdClass();
32 }
Lazy loads the runtime implementations for a Twig element.
Create styles array
The data for the language used.