From 5b4adf66e51e21b3ecbd683397a362b60f792a50 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 7 Apr 2017 15:42:43 -0500 Subject: Move OC_Defaults to OCP\Defaults * currently there are two ways to access default values: OCP\Defaults or OC_Defaults (which is extended by OCA\Theming\ThemingDefaults) * our code used a mixture of both of them, which made it hard to work on theme values * this extended the public interface with the missing methods and uses them everywhere to only rely on the public interface Signed-off-by: Morris Jobke --- tests/lib/Mail/EMailTemplateTest.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'tests/lib/Mail/EMailTemplateTest.php') diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index 47fe09aabbb..ab90dc4aa07 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -24,13 +24,13 @@ namespace Test\Mail; use OC\Mail\EMailTemplate; -use OCA\Theming\ThemingDefaults; +use OCP\Defaults; use OCP\IL10N; use OCP\IURLGenerator; use Test\TestCase; class EMailTemplateTest extends TestCase { - /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */ private $defaults; /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ private $urlGenerator; @@ -42,7 +42,7 @@ class EMailTemplateTest extends TestCase { public function setUp() { parent::setUp(); - $this->defaults = $this->createMock(ThemingDefaults::class); + $this->defaults = $this->createMock(Defaults::class); $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->l10n = $this->createMock(IL10N::class); @@ -62,10 +62,6 @@ class EMailTemplateTest extends TestCase { ->expects($this->any()) ->method('getLogo') ->willReturn('/img/logo-mail-header.png'); - $this->defaults - ->expects($this->any()) - ->method('getCacheBusterCounter') - ->willReturn('48'); $this->urlGenerator ->expects($this->once()) ->method('getAbsoluteURL') @@ -107,10 +103,6 @@ class EMailTemplateTest extends TestCase { ->expects($this->any()) ->method('getLogo') ->willReturn('/img/logo-mail-header.png'); - $this->defaults - ->expects($this->any()) - ->method('getCacheBusterCounter') - ->willReturn('48'); $this->urlGenerator ->expects($this->once()) ->method('getAbsoluteURL') -- cgit v1.2.3