From 7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Mon, 15 Aug 2016 16:43:22 +0200 Subject: Use MockBuilder instead of createMock CI uses an older PHPUnit --- apps/theming/tests/Settings/AdminTest.php | 8 ++++---- apps/theming/tests/Settings/SectionTest.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/theming') 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 -- cgit v1.2.3