渲染后的Twig输出是html + twig代码

I am using twig and output is rendered like without any processing.

Example:

ABCDE

{% if test is defined %}
    defined!
{% endif %}

I wrote the following code:

$loader = new Twig_Loader_Filesystem( __DIR__ . '/src/Gui/views');
$twig = new Twig_Environment($loader, array('cache'=>false));
$template = $twig->load('test.html');
echo $template->render([]);

Template:

<html>
    <head>
        <title>Title</title>
    </head>
    <body>
        <p>ABCDE</p>
        {% if test is defined %}
            <p>defined!</p>
        {% endif %}
    </body>
</html>

I used different templates, but the result does not change.