Фикс для тестов Account модели

This commit is contained in:
ErickSkrauch 2016-11-05 22:05:01 +03:00
parent d5a3daf218
commit b12997d7fc

View File

@ -4,6 +4,7 @@ namespace tests\codeception\common\unit\models;
use Codeception\Specify; use Codeception\Specify;
use common\components\UserPass; use common\components\UserPass;
use common\models\Account; use common\models\Account;
use tests\codeception\common\fixtures\MojangUsernameFixture;
use tests\codeception\common\unit\TestCase; use tests\codeception\common\unit\TestCase;
use Yii; use Yii;
use const common\LATEST_RULES_VERSION; use const common\LATEST_RULES_VERSION;
@ -56,6 +57,10 @@ class AccountTest extends TestCase {
} }
public function testHasMojangUsernameCollision() { public function testHasMojangUsernameCollision() {
$this->tester->haveFixtures([
'mojangUsernames' => MojangUsernameFixture::class,
]);
$this->specify('Expect true if collision with current username', function() { $this->specify('Expect true if collision with current username', function() {
$model = new Account(); $model = new Account();
$model->username = 'ErickSkrauch'; $model->username = 'ErickSkrauch';