diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-24 18:10:16 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-01-24 18:10:16 +0100 |
commit | 870023365c928e6bc3bd39d0d7f9b4d976dad33e (patch) | |
tree | 74c1438392d2101c154a80d4f4b9d4777c77bd1a /apps/theming/tests | |
parent | c3424df1f026854ed8adbfdf8d96da7a6562a8dd (diff) | |
download | nextcloud-server-870023365c928e6bc3bd39d0d7f9b4d976dad33e.tar.gz nextcloud-server-870023365c928e6bc3bd39d0d7f9b4d976dad33e.zip |
Fix "Undefined method setExpectedException()"
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/theming/tests')
-rw-r--r-- | apps/theming/tests/IconBuilderTest.php | 13 |
1 files changed, 4 insertions, 9 deletions
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()) |