ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Tests_Util_DeprecationCollectorTest Class Reference
+ Inheritance diagram for Twig_Tests_Util_DeprecationCollectorTest:
+ Collaboration diagram for Twig_Tests_Util_DeprecationCollectorTest:

Public Member Functions

 testCollect ()
 PHP 5.3 More...
 
 deprec ()
 

Detailed Description

Definition at line 12 of file DeprecationCollectorTest.php.

Member Function Documentation

◆ deprec()

Twig_Tests_Util_DeprecationCollectorTest::deprec ( )

Definition at line 28 of file DeprecationCollectorTest.php.

29  {
30  }

◆ testCollect()

Twig_Tests_Util_DeprecationCollectorTest::testCollect ( )

PHP 5.3

Definition at line 17 of file DeprecationCollectorTest.php.

References array.

18  {
19  $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock());
20  $twig->addFunction(new Twig_SimpleFunction('deprec', array($this, 'deprec'), array('deprecated' => true)));
21 
22  $collector = new Twig_Util_DeprecationCollector($twig);
23  $deprecations = $collector->collect(new Twig_Tests_Util_Iterator());
24 
25  $this->assertEquals(array('Twig Function "deprec" is deprecated in deprec.twig at line 1.'), $deprecations);
26  }
Represents a template function.
Create styles array
The data for the language used.
Stores the Twig configuration.
Definition: Environment.php:17

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