mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-08 12:55:46 +00:00
Improve error reporting
This commit is contained in:
+2
-2
@@ -97,7 +97,7 @@ EOHTML,
|
||||
|
||||
$this->fail();
|
||||
} catch (RuntimeError $e) {
|
||||
$this->assertEquals('Variable "foo" does not exist.', $e->getMessage());
|
||||
$this->assertEquals('Variable "foo" does not exist in "index.html" at line 3.', $e->getMessage());
|
||||
$this->assertEquals(3, $e->getTemplateLine());
|
||||
$this->assertEquals('index.html', $e->getSourceContext()->getName());
|
||||
$this->assertEquals(3, $e->getLine());
|
||||
@@ -116,7 +116,7 @@ EOHTML,
|
||||
|
||||
$this->fail();
|
||||
} catch (RuntimeError $e) {
|
||||
$this->assertEquals('An exception has been thrown during the rendering of a template ("Runtime error...").', $e->getMessage());
|
||||
$this->assertEquals('An exception has been thrown during the rendering of a template ("Runtime error...") in "index.html" at line 3.', $e->getMessage());
|
||||
$this->assertEquals(3, $e->getTemplateLine());
|
||||
$this->assertEquals('index.html', $e->getSourceContext()->getName());
|
||||
$this->assertEquals(3, $e->getLine());
|
||||
|
||||
Reference in New Issue
Block a user