summaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-08-15 16:43:22 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-08-15 16:43:22 +0200
commit7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae (patch)
tree8472e73eb69f8495405231d44e1d580cbd0942bd /apps/theming
parent8a7a0f328746230dd896ccc53b3ada271a91b930 (diff)
downloadnextcloud-server-7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae.tar.gz
nextcloud-server-7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae.zip
Use MockBuilder instead of createMock
CI uses an older PHPUnit
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/tests/Settings/AdminTest.php8
-rw-r--r--apps/theming/tests/Settings/SectionTest.php2
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/theming/tests/Settings/AdminTest.php b/apps/theming/tests/Settings/AdminTest.php
index ff42c6997a6..18c2064e8ce 100644
--- a/apps/theming/tests/Settings/AdminTest.php
+++ b/apps/theming/tests/Settings/AdminTest.php
@@ -45,10 +45,10 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->config = $this->createMock('\OCP\IConfig');
- $this->l10n = $this->createMock('\OCP\IL10N');
- $this->themingDefaults = $this->createMock('\OCA\Theming\ThemingDefaults');
- $this->urlGenerator = $this->createMock('\OCP\IURLGenerator');
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
+ $this->l10n = $this->getMockBuilder('\OCP\IL10N')->getMock();
+ $this->themingDefaults = $this->getMockBuilder('\OCA\Theming\ThemingDefaults')->disableOriginalConstructor()->getMock();
+ $this->urlGenerator = $this->getMockBuilder('\OCP\IURLGenerator')->getMock();
$this->admin = new Admin(
$this->config,
diff --git a/apps/theming/tests/Settings/SectionTest.php b/apps/theming/tests/Settings/SectionTest.php
index e8a9a217f1f..3a3a4375236 100644
--- a/apps/theming/tests/Settings/SectionTest.php
+++ b/apps/theming/tests/Settings/SectionTest.php
@@ -35,7 +35,7 @@ class SectionTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->l = $this->createMock('\OCP\IL10N');
+ $this->l = $this->getMockBuilder('\OCP\IL10N')->getMock();
$this->section = new Section(
$this->l