mirror of
https://github.com/elyby/accounts.git
synced 2024-12-29 16:40:25 +05:30
Фикс для тестов Account модели
This commit is contained in:
parent
d5a3daf218
commit
b12997d7fc
@ -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';
|
||||||
|
Loading…
Reference in New Issue
Block a user