Update ely/php-code-style and run updated CS fixer

This commit is contained in:
ErickSkrauch
2019-02-26 02:26:02 +03:00
parent ea4ebd19ef
commit b20825a051
67 changed files with 250 additions and 252 deletions

View File

@@ -14,7 +14,7 @@ class TemplateTest extends TestCase {
public function testConstructor() {
/** @var Template|\Mockery\MockInterface $template */
$template = mock(Template::class, ['find-me'])->makePartial();
$this->assertEquals('find-me', $template->getTo());
$this->assertSame('find-me', $template->getTo());
$this->assertInstanceOf(MailerInterface::class, $template->getMailer());
}
@@ -22,13 +22,13 @@ class TemplateTest extends TestCase {
Yii::$app->params['fromEmail'] = 'find-me';
/** @var Template|\Mockery\MockInterface $template */
$template = mock(Template::class)->makePartial();
$this->assertEquals(['find-me' => 'Ely.by Accounts'], $template->getFrom());
$this->assertSame(['find-me' => 'Ely.by Accounts'], $template->getFrom());
}
public function testGetParams() {
/** @var Template|\Mockery\MockInterface $template */
$template = mock(Template::class)->makePartial();
$this->assertEquals([], $template->getParams());
$this->assertSame([], $template->getParams());
}
public function testCreateMessage() {
@@ -39,9 +39,9 @@ class TemplateTest extends TestCase {
/** @var MessageInterface $message */
$message = $this->callProtected($template, 'createMessage');
$this->assertInstanceOf(MessageInterface::class, $message);
$this->assertEquals(['to@ely.by' => 'To'], $message->getTo());
$this->assertEquals(['from@ely.by' => 'Ely.by Accounts'], $message->getFrom());
$this->assertEquals('mock-subject', $message->getSubject());
$this->assertSame(['to@ely.by' => 'To'], $message->getTo());
$this->assertSame(['from@ely.by' => 'Ely.by Accounts'], $message->getFrom());
$this->assertSame('mock-subject', $message->getSubject());
}
}

View File

@@ -15,8 +15,8 @@ class TemplateWithRendererTest extends TestCase {
public function testConstructor() {
/** @var TemplateWithRenderer|\Mockery\MockInterface $template */
$template = mock(TemplateWithRenderer::class, ['mock-to', 'mock-locale'])->makePartial();
$this->assertEquals('mock-to', $template->getTo());
$this->assertEquals('mock-locale', $template->getLocale());
$this->assertSame('mock-to', $template->getTo());
$this->assertSame('mock-locale', $template->getLocale());
$this->assertInstanceOf(MailerInterface::class, $template->getMailer());
$this->assertInstanceOf(EmailRenderer::class, $template->getEmailRenderer());
}
@@ -40,10 +40,10 @@ class TemplateWithRendererTest extends TestCase {
/** @var \yii\swiftmailer\Message $message */
$message = $this->callProtected($template, 'createMessage');
$this->assertInstanceOf(MessageInterface::class, $message);
$this->assertEquals(['to@ely.by' => 'To'], $message->getTo());
$this->assertEquals(['from@ely.by' => 'From'], $message->getFrom());
$this->assertEquals('mock-subject', $message->getSubject());
$this->assertEquals('mock-html', $message->getSwiftMessage()->getBody());
$this->assertSame(['to@ely.by' => 'To'], $message->getTo());
$this->assertSame(['from@ely.by' => 'From'], $message->getFrom());
$this->assertSame('mock-subject', $message->getSubject());
$this->assertSame('mock-html', $message->getSwiftMessage()->getBody());
}
}