ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Twig_Tests_FileExtensionEscapingStrategyTest Class Reference
+ Inheritance diagram for Twig_Tests_FileExtensionEscapingStrategyTest:
+ Collaboration diagram for Twig_Tests_FileExtensionEscapingStrategyTest:

Public Member Functions

 testGuess ($strategy, $filename)
 @dataProvider getGuessData More...
 
 getGuessData ()
 

Detailed Description

Definition at line 12 of file FileExtensionEscapingStrategyTest.php.

Member Function Documentation

◆ getGuessData()

Twig_Tests_FileExtensionEscapingStrategyTest::getGuessData ( )

Definition at line 22 of file FileExtensionEscapingStrategyTest.php.

23 {
24 return array(
25 // default
26 array('html', 'foo.html'),
27 array('html', 'foo.html.twig'),
28 array('html', 'foo'),
29 array('html', 'foo.bar.twig'),
30 array('html', 'foo.txt/foo'),
31 array('html', 'foo.txt/foo.js/'),
32
33 // css
34 array('css', 'foo.css'),
35 array('css', 'foo.css.twig'),
36 array('css', 'foo.twig.css'),
37 array('css', 'foo.js.css'),
38 array('css', 'foo.js.css.twig'),
39
40 // js
41 array('js', 'foo.js'),
42 array('js', 'foo.js.twig'),
43 array('js', 'foo.txt/foo.js'),
44 array('js', 'foo.txt.twig/foo.js'),
45
46 // txt
47 array(false, 'foo.txt'),
48 array(false, 'foo.txt.twig'),
49 );
50 }

◆ testGuess()

Twig_Tests_FileExtensionEscapingStrategyTest::testGuess (   $strategy,
  $filename 
)

@dataProvider getGuessData

Definition at line 17 of file FileExtensionEscapingStrategyTest.php.

18 {
19 $this->assertSame($strategy, Twig_FileExtensionEscapingStrategy::guess($filename));
20 }
$filename
Definition: buildRTE.php:89
static guess($name)
Guesses the best autoescaping strategy based on the file name.

References $filename, and Twig_FileExtensionEscapingStrategy\guess().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: