Definition at line 14 of file TextTest.php.
◆ getTruncateTestData()
Twig_Tests_Extension_TextTest::getTruncateTestData |
( |
| ) |
|
Definition at line 38 of file TextTest.php.
References array.
41 array(
'This is a very long sentence.', 2,
false,
'...',
'Th...'),
42 array(
'This is a very long sentence.', 6,
false,
'...',
'This i...'),
43 array(
'This is a very long sentence.', 2,
true,
'...',
'This...'),
44 array(
'This is a very long sentence.', 2,
true,
'[...]',
'This[...]'),
45 array(
'This is a very long sentence.', 23,
false,
'...',
'This is a very long sen...'),
46 array(
'This is a very long sentence.', 23,
true,
'...',
'This is a very long sentence.'),
Create styles array
The data for the language used.
◆ setUp()
Twig_Tests_Extension_TextTest::setUp |
( |
| ) |
|
Definition at line 19 of file TextTest.php.
21 $this->env = $this->getMockBuilder(
'Twig_Environment')->disableOriginalConstructor()->getMock();
23 ->expects($this->any())
24 ->method(
'getCharset')
25 ->will($this->returnValue(
'utf-8'))
◆ testTruncate()
Twig_Tests_Extension_TextTest::testTruncate |
( |
|
$input, |
|
|
|
$length, |
|
|
|
$preserve, |
|
|
|
$separator, |
|
|
|
$expectedOutput |
|
) |
| |
getTruncateTestData
Definition at line 32 of file TextTest.php.
References $output.
34 $output = twig_truncate_filter($this->env, $input, $length, $preserve, $separator);
35 $this->assertEquals($expectedOutput,
$output);
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
◆ $env
Twig_Tests_Extension_TextTest::$env |
|
private |
The documentation for this class was generated from the following file:
- libs/composer/vendor/twig/extensions/test/Twig/Tests/Extension/TextTest.php