'{% if is_rtl() %}rtl{% endif %}']; $twig = new Environment(new \MailPoetVendor\Twig\Loader\ArrayLoader($template)); WPFunctions::set(Stub::make(new WPFunctions, [ 'isRtl' => Stub::consecutive(true, false), ])); $twig->addExtension(new Functions()); $resultRtl = $twig->render('template'); verify($resultRtl)->equals('rtl'); $resultNoRtl = $twig->render('template'); verify($resultNoRtl)->empty(); } }