summaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-11-28 08:36:10 +0100
committerGitHub <noreply@github.com>2019-11-28 08:36:10 +0100
commit669302e570024c83140ff5c4f4b1489c5a1c66ed (patch)
tree010182798f5c83193554031753e063a8a0b35ca1 /apps/theming
parent125be68311a319f2b839e5aa4ea29cd642cd1e00 (diff)
parente3e782b63df4f1d65c86cb3b204b4bdecf93a6cd (diff)
downloadnextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.tar.gz
nextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.zip
Merge pull request #18064 from nextcloud/feature/php74
Add php7.4 support
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/tests/CapabilitiesTest.php2
-rw-r--r--apps/theming/tests/Controller/IconControllerTest.php2
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php4
-rw-r--r--apps/theming/tests/IconBuilderTest.php2
-rw-r--r--apps/theming/tests/ImageManagerTest.php14
-rw-r--r--apps/theming/tests/ServicesTest.php2
-rw-r--r--apps/theming/tests/Settings/AdminTest.php2
-rw-r--r--apps/theming/tests/Settings/SectionTest.php2
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php2
-rw-r--r--apps/theming/tests/UtilTest.php2
10 files changed, 17 insertions, 17 deletions
diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php
index f007de1dbdb..76dd680b49a 100644
--- a/apps/theming/tests/CapabilitiesTest.php
+++ b/apps/theming/tests/CapabilitiesTest.php
@@ -55,7 +55,7 @@ class CapabilitiesTest extends TestCase {
/** @var Capabilities */
protected $capabilities;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->theming = $this->createMock(ThemingDefaults::class);
diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php
index 85259b9abe7..9d5970fd384 100644
--- a/apps/theming/tests/Controller/IconControllerTest.php
+++ b/apps/theming/tests/Controller/IconControllerTest.php
@@ -61,7 +61,7 @@ class IconControllerTest extends TestCase {
/** @var ImageManager */
private $imageManager;
- public function setUp() {
+ protected function setUp(): void {
$this->request = $this->createMock(IRequest::class);
$this->themingDefaults = $this->createMock(ThemingDefaults::class);
$this->iconBuilder = $this->createMock(IconBuilder::class);
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index 63e5d1e285a..8d4650e68b3 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -83,7 +83,7 @@ class ThemingControllerTest extends TestCase {
/** @var IURLGenerator */
private $urlGenerator;
- public function setUp() {
+ protected function setUp(): void {
$this->request = $this->createMock(IRequest::class);
$this->config = $this->createMock(IConfig::class);
$this->themingDefaults = $this->createMock(ThemingDefaults::class);
@@ -118,7 +118,7 @@ class ThemingControllerTest extends TestCase {
$this->imageManager
);
- return parent::setUp();
+ parent::setUp();
}
public function dataUpdateStylesheetSuccess() {
diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php
index 69ec6495605..a6999c331ce 100644
--- a/apps/theming/tests/IconBuilderTest.php
+++ b/apps/theming/tests/IconBuilderTest.php
@@ -54,7 +54,7 @@ class IconBuilderTest extends TestCase {
/** @var IAppManager */
protected $appManager;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php
index 0f03c565e91..7d61b80efdf 100644
--- a/apps/theming/tests/ImageManagerTest.php
+++ b/apps/theming/tests/ImageManagerTest.php
@@ -51,7 +51,7 @@ class ImageManagerTest extends TestCase {
/** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
private $logger;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
$this->appData = $this->createMock(IAppData::class);
@@ -184,10 +184,10 @@ class ImageManagerTest extends TestCase {
$this->assertEquals($file, $this->imageManager->getImage('logo', false));
}
- /**
- * @expectedException OCP\Files\NotFoundException
- */
+
public function testGetImageUnset() {
+ $this->expectException(\OCP\Files\NotFoundException::class);
+
$this->config->expects($this->once())
->method('getAppValue')->with('theming', 'logoMime', false)
->willReturn(false);
@@ -239,10 +239,10 @@ class ImageManagerTest extends TestCase {
$this->assertEquals($expected, $this->imageManager->getCachedImage('filename'));
}
- /**
- * @expectedException \OCP\Files\NotFoundException
- */
+
public function testGetCachedImageNotFound() {
+ $this->expectException(\OCP\Files\NotFoundException::class);
+
$folder = $this->setupCacheFolder();
$folder->expects($this->once())
->method('getFile')
diff --git a/apps/theming/tests/ServicesTest.php b/apps/theming/tests/ServicesTest.php
index a46e28235f5..b274e5868d6 100644
--- a/apps/theming/tests/ServicesTest.php
+++ b/apps/theming/tests/ServicesTest.php
@@ -49,7 +49,7 @@ class ServicesTest extends TestCase {
/** @var \OCP\AppFramework\IAppContainer */
protected $container;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->app = new App('theming');
$this->container = $this->app->getContainer();
diff --git a/apps/theming/tests/Settings/AdminTest.php b/apps/theming/tests/Settings/AdminTest.php
index 5943866edc1..50d0e454445 100644
--- a/apps/theming/tests/Settings/AdminTest.php
+++ b/apps/theming/tests/Settings/AdminTest.php
@@ -50,7 +50,7 @@ class AdminTest extends TestCase {
/** @var IL10N */
private $l10n;
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
$this->l10n = $this->createMock(IL10N::class);
diff --git a/apps/theming/tests/Settings/SectionTest.php b/apps/theming/tests/Settings/SectionTest.php
index 09abf9e34f5..dff2df3502a 100644
--- a/apps/theming/tests/Settings/SectionTest.php
+++ b/apps/theming/tests/Settings/SectionTest.php
@@ -37,7 +37,7 @@ class SectionTest extends TestCase {
/** @var Section */
private $section;
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->url = $this->createMock(IURLGenerator::class);
$this->l = $this->createMock(IL10N::class);
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index 71b8ba97e9b..20c80211b8d 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -72,7 +72,7 @@ class ThemingDefaultsTest extends TestCase {
/** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */
private $navigationManager;
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
$this->l10n = $this->createMock(IL10N::class);
diff --git a/apps/theming/tests/UtilTest.php b/apps/theming/tests/UtilTest.php
index 9fa5dd91da8..f8e1750113c 100644
--- a/apps/theming/tests/UtilTest.php
+++ b/apps/theming/tests/UtilTest.php
@@ -46,7 +46,7 @@ class UtilTest extends TestCase {
/** @var IAppManager */
protected $appManager;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
$this->appData = $this->createMock(IAppData::class);