4 * This file is part of Twig.
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 class Twig_Tests_FactoryRuntimeLoaderTest extends \PHPUnit\Framework\TestCase
14 public function testLoad()
16 $loader = new Twig_FactoryRuntimeLoader(array('stdClass' => 'getRuntime'));
18 $this->assertInstanceOf('stdClass', $loader->load('stdClass'));
21 public function testLoadReturnsNullForUnmappedRuntime()
23 $loader = new Twig_FactoryRuntimeLoader();
25 $this->assertNull($loader->load('stdClass'));
31 return new stdClass();