mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 03:16:34 +00:00
c0f11545fde42d2d52a54b0b521617c34e8f5c8c
This PR was merged into the 3.x branch.
Discussion
----------
Fix testExtensionsAreNotInitializedWhenRenderingACompiledTemplate
I stumbled over this test while checking for PHPUnit deprecations. In this case, we need to do something about the `setMethods()` call which has been removed in PHPUnit 11.
However, we add an expectation for a method `initExtensions()` which has been removed a long time ago. So, if that method was actually called, we'd get an error anyway. Expecting this method not to be called feels a little redundant. ~~This basically means, we can run this test against an unmocked `Environment`. But if we do so, the test does not really test what it's supposed to test which is why I decided to remove the whole test.~~
Update: Instead, I'm now registering an extension that throws if we try to initialize it.
Commits
-------
3a4d513f Fix testExtensionsAreNotInitializedWhenRenderingACompiledTemplate
…
Twig, the flexible, fast, and secure template language for PHP
==============================================================
Twig is a template language for PHP.
Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.
Sponsors
--------
.. raw:: html
<a href="https://docs.blackfire.io/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
<img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
</a>
More Information
----------------
Read the `documentation`_ for more information.
.. _documentation: https://twig.symfony.com/documentation
Description
Languages
PHP
99.9%