From: Fabien Potencier Date: Tue, 18 Sep 2012 09:37:33 +0000 (+0200) Subject: tweaked docs X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=66a8c0b89e1ac0577fe191ea5e5f5071d2c28bc2;p=web%2Fkonrad%2Ftwig.git tweaked docs --- diff --git a/doc/advanced.rst b/doc/advanced.rst index 46dc6de..4be84ed 100644 --- a/doc/advanced.rst +++ b/doc/advanced.rst @@ -832,11 +832,17 @@ The ``getTests()`` methods allows to add new test functions:: // ... } +Testing an Extension +-------------------- + +.. versionadded:: 1.10 + Support for functional tests was added in Twig 1.10. + Functional Tests ~~~~~~~~~~~~~~~~ -You can create functional tests for extensions simply by creating the following file structure -in your test directory:: +You can create functional tests for extensions simply by creating the +following file structure in your test directory:: Fixtures/ filters/ @@ -868,15 +874,17 @@ The ``IntegrationTest.php`` file should look like this:: } } -Fixtures examples can be found within the Twig repository ``tests/Twig/Fixtures`` directory. +Fixtures examples can be found within the Twig repository +`tests/Twig/Fixtures`_ directory. Node Tests ~~~~~~~~~~ Testing the node visitors can be complex, so extend your test cases from -``Twig_Test_NodeTestCase``. Examples can be found in the Twig repository ``tests/Twig/Node`` directory. +``Twig_Test_NodeTestCase``. Examples can be found in the Twig repository +`tests/Twig/Node`_ directory. .. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register -.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php -.. _`tests/Twig/Fixtures`: https://github.com/fabpot/Twig/tree/master/test/Twig/Tests/Fixtures -.. _`tests/Twig/Node`: https://github.com/fabpot/Twig/tree/master/test/Twig/Tests/Node +.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php +.. _`tests/Twig/Fixtures`: https://github.com/fabpot/Twig/tree/master/test/Twig/Tests/Fixtures +.. _`tests/Twig/Node`: https://github.com/fabpot/Twig/tree/master/test/Twig/Tests/Node