@ -21,12 +21,11 @@
namespace Tests\Settings\Mailer;
use OC\Mail\EMailTemplate;
use OC\Mail\IEMailTemplate;
use OC\Mail\Message;
use OC\Settings\Mailer\NewUserMailHelper;
use OCA\Theming\ThemingDefaults;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Defaults;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IURLGenerator;
@ -37,8 +36,8 @@ use OCP\Security\ISecureRandom;
use Test\TestCase;
class NewUserMailHelperTest extends TestCase {
/** @var Theming Defaults|\PHPUnit_Framework_MockObject_MockObject */
private $themingD efaults;
/** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
private $d efaults;
/** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
private $urlGenerator;
/** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
@ -59,7 +58,7 @@ class NewUserMailHelperTest extends TestCase {
public function setUp() {
parent::setUp();
$this->themingDefaults = $this->createMock(Theming Defaults::class);
$this->defaults = $this->createMock( Defaults::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->l10n = $this->createMock(IL10N::class);
$this->mailer = $this->createMock(IMailer::class);
@ -73,7 +72,7 @@ class NewUserMailHelperTest extends TestCase {
}));
$this->newUserMailHelper = new NewUserMailHelper(
$this->themingD efaults,
$this->d efaults,
$this->urlGenerator,
$this->l10n,
$this->mailer,
@ -144,7 +143,7 @@ class NewUserMailHelperTest extends TestCase {
->expects($this->at(5))
->method('getUID')
->willReturn('john');
$this->themingD efaults
$this->d efaults
->expects($this->at(0))
->method('getName')
->willReturn('TestCloud');
@ -175,7 +174,7 @@ class NewUserMailHelperTest extends TestCase {
< tbody >
< tr style = "padding:0;text-align:left;vertical-align:top" >
< center data-parsed = "" style = "min-width:580px;width:100%" >
< img class = "logo float-center" src = "?v= " alt = "logo" align = "center" style = "-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto" >
< img class = "logo float-center" src = "" alt = "logo" align = "center" style = "-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto" >
< / center >
< / tr >
< / tbody >
@ -376,7 +375,7 @@ EOF;
->expects($this->at(1))
->method('getUID')
->willReturn('john');
$this->themingD efaults
$this->d efaults
->expects($this->any())
->method('getName')
->willReturn('TestCloud');
@ -407,7 +406,7 @@ EOF;
< tbody >
< tr style = "padding:0;text-align:left;vertical-align:top" >
< center data-parsed = "" style = "min-width:580px;width:100%" >
< img class = "logo float-center" src = "?v= " alt = "logo" align = "center" style = "-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto" >
< img class = "logo float-center" src = "" alt = "logo" align = "center" style = "-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;max-height:100%;max-width:100px;outline:0;text-align:center;text-decoration:none;width:auto" >
< / center >
< / tr >
< / tbody >
@ -609,7 +608,7 @@ EOF;
->expects($this->at(0))
->method('setTo')
->with(['recipient@example.com' => 'John Doe']);
$this->themingD efaults
$this->d efaults
->expects($this->exactly(2))
->method('getName')
->willReturn('TestCloud');