summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Wisselink <wisskid@users.noreply.github.com>2022-01-10 09:46:01 +0100
committerGitHub <noreply@github.com>2022-01-10 09:46:01 +0100
commitbaad3115cd8fd001a113b6605c0e6393e823d598 (patch)
treebcba365fb8bc593cc5c97437111974982195b193 /tests
parent6f4f06db7ebbad6ae7bc98027d9385e60a016906 (diff)
downloadsmarty-baad3115cd8fd001a113b6605c0e6393e823d598.tar.gz
smarty-baad3115cd8fd001a113b6605c0e6393e823d598.tar.bz2
smarty-baad3115cd8fd001a113b6605c0e6393e823d598.zip
Fixed PHPUnit expected Exceptions. (#701)
Diffstat (limited to 'tests')
-rw-r--r--tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php b/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php
index 7506f167..299a6852 100644
--- a/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php
+++ b/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php
@@ -108,31 +108,25 @@ class MathTest extends PHPUnit_Smarty
$this->assertEquals($expected, $this->smarty->fetch($tpl));
}
- /**
- * @expectedException PHPUnit_Framework_Error_Warning
- */
public function testBackticksIllegal()
{
+ $this->expectException(PHPUnit\Framework\Error\Warning::class);
$expected = "22.00";
$tpl = $this->smarty->createTemplate('eval:{$x = "4"}{$y = "5.5"}{math equation="`ls` x * y" x=$x y=$y}');
$this->assertEquals($expected, $this->smarty->fetch($tpl));
}
- /**
- * @expectedException PHPUnit_Framework_Error_Warning
- */
public function testDollarSignsIllegal()
{
+ $this->expectException(PHPUnit\Framework\Error\Warning::class);
$expected = "22.00";
$tpl = $this->smarty->createTemplate('eval:{$x = "4"}{$y = "5.5"}{math equation="$" x=$x y=$y}');
$this->assertEquals($expected, $this->smarty->fetch($tpl));
}
- /**
- * @expectedException PHPUnit_Framework_Error_Warning
- */
public function testBracketsIllegal()
{
+ $this->expectException(PHPUnit\Framework\Error\Warning::class);
$expected = "I";
$tpl = $this->smarty->createTemplate('eval:{$x = "0"}{$y = "1"}{math equation="((y/x).(x))[x]" x=$x y=$y}');
$this->assertEquals($expected, $this->smarty->fetch($tpl));