aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-01-24 18:10:16 +0100
committerJoas Schilling <coding@schilljs.com>2018-01-24 18:10:16 +0100
commit870023365c928e6bc3bd39d0d7f9b4d976dad33e (patch)
tree74c1438392d2101c154a80d4f4b9d4777c77bd1a /apps/theming/tests
parentc3424df1f026854ed8adbfdf8d96da7a6562a8dd (diff)
downloadnextcloud-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.php13
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())