Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 17:27:18 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 17:27:18 +0300
commit3a7cf40aaa678bea1df143d2982d603b7a334eec (patch)
tree63c1e3ad7f7f401d14411a4d44c523632906afc9 /apps/theming/tests
parent0568b012672d650c6b5a49e72c4028dde5463c60 (diff)
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/theming/tests')
-rw-r--r--apps/theming/tests/Controller/IconControllerTest.php2
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php2
-rw-r--r--apps/theming/tests/ImageManagerTest.php12
-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
6 files changed, 11 insertions, 11 deletions
diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php
index df0fdd52b3f..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(): void {
+ 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 a626fdebe6d..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(): void {
+ protected function setUp(): void {
$this->request = $this->createMock(IRequest::class);
$this->config = $this->createMock(IConfig::class);
$this->themingDefaults = $this->createMock(ThemingDefaults::class);
diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php
index 56fa63bea7b..7d61b80efdf 100644
--- a/apps/theming/tests/ImageManagerTest.php
+++ b/apps/theming/tests/ImageManagerTest.php
@@ -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/Settings/AdminTest.php b/apps/theming/tests/Settings/AdminTest.php
index 4e89366c3f2..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(): void {
+ 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 10d6bb172f2..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(): void {
+ 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 b7413eaf47d..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(): void {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
$this->l10n = $this->createMock(IL10N::class);