From 870023365c928e6bc3bd39d0d7f9b4d976dad33e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 24 Jan 2018 18:10:16 +0100 Subject: Fix "Undefined method setExpectedException()" Signed-off-by: Joas Schilling --- apps/theming/tests/IconBuilderTest.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'apps/theming/tests') diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 4f5078d4c56..a2a330a2f24 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -34,6 +34,7 @@ use OCP\Files\IAppData; use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\IConfig; +use PHPUnit\Framework\Error\Warning; use Test\TestCase; class IconBuilderTest extends TestCase { @@ -172,11 +173,9 @@ class IconBuilderTest extends TestCase { // cloud be something like $expectedIcon->compareImages($icon, Imagick::METRIC_MEANABSOLUTEERROR)[1]) } - /** - * @expectedException \PHPUnit_Framework_Error_Warning - */ public function testGetFaviconNotFound() { $this->checkImagick(); + $this->expectException(Warning::class); $util = $this->getMockBuilder(Util::class)->disableOriginalConstructor()->getMock(); $iconBuilder = new IconBuilder($this->themingDefaults, $util); $this->themingDefaults->expects($this->once()) @@ -188,11 +187,9 @@ class IconBuilderTest extends TestCase { $this->assertFalse($iconBuilder->getFavicon('noapp')); } - /** - * @expectedException \PHPUnit_Framework_Error_Warning - */ public function testGetTouchIconNotFound() { $this->checkImagick(); + $this->expectException(Warning::class); $util = $this->getMockBuilder(Util::class)->disableOriginalConstructor()->getMock(); $iconBuilder = new IconBuilder($this->themingDefaults, $util); $util->expects($this->once()) @@ -201,11 +198,9 @@ class IconBuilderTest extends TestCase { $this->assertFalse($iconBuilder->getTouchIcon('noapp')); } - /** - * @expectedException \PHPUnit_Framework_Error_Warning - */ public function testColorSvgNotFound() { $this->checkImagick(); + $this->expectException(Warning::class); $util = $this->getMockBuilder(Util::class)->disableOriginalConstructor()->getMock(); $iconBuilder = new IconBuilder($this->themingDefaults, $util); $util->expects($this->once()) -- cgit v1.2.3