mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 19:06:40 +00:00
fixed exception message that might end with a ?
This commit is contained in:
@@ -167,7 +167,8 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
|
|||||||
if (false !== $exception) {
|
if (false !== $exception) {
|
||||||
$message = $e->getMessage();
|
$message = $e->getMessage();
|
||||||
$this->assertSame(trim($exception), trim(sprintf('%s: %s', get_class($e), $message)));
|
$this->assertSame(trim($exception), trim(sprintf('%s: %s', get_class($e), $message)));
|
||||||
$this->assertSame('.', substr($message, strlen($message) - 1), $message, 'Exception message must end with a dot.');
|
$last = substr($message, strlen($message) - 1);
|
||||||
|
$this->assertTrue('.' === $last || '?' === $last, $message, 'Exception message must end with a dot or a question mark.');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user