Definition at line 12 of file ChainTest.php.
◆ testAddLoader()
Twig_Tests_Loader_ChainTest::testAddLoader |
( |
| ) |
|
Definition at line 91 of file ChainTest.php.
References $loader, and array.
96 $this->assertEquals(
'bar',
$loader->getSourceContext(
'foo')->getCode());
Loads templates from other loaders.
Create styles array
The data for the language used.
Loads a template from an array.
◆ testExists()
Twig_Tests_Loader_ChainTest::testExists |
( |
| ) |
|
Definition at line 99 of file ChainTest.php.
References $loader.
101 $loader1 = $this->getMockBuilder(
'Twig_ChainTestLoaderWithExistsInterface')->getMock();
102 $loader1->expects($this->once())->method(
'exists')->will($this->returnValue(
false));
103 $loader1->expects($this->never())->method(
'getSourceContext');
106 $loader2 = $this->getMockBuilder(
'Twig_ChainTestLoaderInterface')->getMock();
108 $loader2->expects($this->once())->method(
'getSourceContext')->will($this->returnValue(
new Twig_Source(
'content',
'index')));
114 $this->assertTrue(
$loader->exists(
'foo'));
Loads templates from other loaders.
Holds information about a non-compiled Twig template.
◆ testGetCacheKey()
Twig_Tests_Loader_ChainTest::testGetCacheKey |
( |
| ) |
|
Definition at line 70 of file ChainTest.php.
References $loader, and array.
77 $this->assertEquals(
'foo:bar',
$loader->getCacheKey(
'foo'));
78 $this->assertEquals(
'bar:foo',
$loader->getCacheKey(
'bar'));
Loads templates from other loaders.
Create styles array
The data for the language used.
Loads a template from an array.
◆ testGetCacheKeyWhenTemplateDoesNotExist()
Twig_Tests_Loader_ChainTest::testGetCacheKeyWhenTemplateDoesNotExist |
( |
| ) |
|
◆ testGetSource()
Twig_Tests_Loader_ChainTest::testGetSource |
( |
| ) |
|
legacy
Definition at line 17 of file ChainTest.php.
References $loader, and array.
24 $this->assertEquals(
'bar',
$loader->getSource(
'foo'));
25 $this->assertEquals(
'foo',
$loader->getSource(
'bar'));
Loads templates from other loaders.
Create styles array
The data for the language used.
Loads a template from an array.
◆ testGetSourceContext()
Twig_Tests_Loader_ChainTest::testGetSourceContext |
( |
| ) |
|
Definition at line 28 of file ChainTest.php.
References $loader, $path, and array.
30 $path = dirname(__FILE__).
'/../Fixtures';
37 $this->assertEquals(
'foo',
$loader->getSourceContext(
'foo')->getName());
38 $this->assertSame(
'',
$loader->getSourceContext(
'foo')->getPath());
40 $this->assertEquals(
'errors/index.html',
$loader->getSourceContext(
'errors/index.html')->getName());
41 $this->assertSame(
'',
$loader->getSourceContext(
'errors/index.html')->getPath());
42 $this->assertEquals(
'baz',
$loader->getSourceContext(
'errors/index.html')->getCode());
44 $this->assertEquals(
'errors/base.html',
$loader->getSourceContext(
'errors/base.html')->getName());
45 $this->assertEquals(realpath(
$path.
'/errors/base.html'), realpath(
$loader->getSourceContext(
'errors/base.html')->getPath()));
46 $this->assertNotEquals(
'baz',
$loader->getSourceContext(
'errors/base.html')->getCode());
Loads template from the filesystem.
Loads templates from other loaders.
Create styles array
The data for the language used.
Loads a template from an array.
◆ testGetSourceContextWhenTemplateDoesNotExist()
Twig_Tests_Loader_ChainTest::testGetSourceContextWhenTemplateDoesNotExist |
( |
| ) |
|
◆ testGetSourceWhenTemplateDoesNotExist()
Twig_Tests_Loader_ChainTest::testGetSourceWhenTemplateDoesNotExist |
( |
| ) |
|
The documentation for this class was generated from the following file:
- libs/composer/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php