Добавлены тесты для новоявленного компонента

This commit is contained in:
ErickSkrauch
2017-04-25 02:09:59 +03:00
parent 8c6921ff0e
commit f3259c9c0e
6 changed files with 117 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
<?php
namespace tests\codeception\common\unit\emails;
use common\emails\EmailHelper;
use common\models\Account;
use tests\codeception\common\unit\TestCase;
class EmailHelperTest extends TestCase {
public function testBuildTo() {
/** @var Account|\Mockery\MockInterface $account */
$account = mock(Account::class)->makePartial();
$account->username = 'mock-username';
$account->email = 'mock@ely.by';
$this->assertEquals(['mock@ely.by' => 'mock-username'], EmailHelper::buildTo($account));
}
}