芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/fmd/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php
getMockBuilder('Twig_LoaderInterface')->getMock()); $twig->addFunction(new Twig_SimpleFunction('deprec', array($this, 'deprec'), array('deprecated' => true))); $collector = new Twig_Util_DeprecationCollector($twig); $deprecations = $collector->collect(new Twig_Tests_Util_Iterator()); $this->assertEquals(array('Twig Function "deprec" is deprecated in deprec.twig at line 1.'), $deprecations); } public function deprec() { } } class Twig_Tests_Util_Iterator implements IteratorAggregate { public function getIterator() { return new ArrayIterator(array( 'ok.twig' => '{{ foo }}', 'deprec.twig' => '{{ deprec("foo") }}', )); } }