Fixed the expected exception in the Twig test