Fabien Potencier c0f11545fd minor #4263 Fix testExtensionsAreNotInitializedWhenRenderingACompiledTemplate (derrabus)
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
2024-09-02 22:20:58 +02:00
2024-08-10 12:32:24 +02:00
2024-09-01 22:54:59 +02:00
2024-08-29 19:26:49 +02:00
2024-08-10 12:32:24 +02:00

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
Languages
PHP 99.9%