Fix codestyle

This commit is contained in:
ErickSkrauch 2019-02-23 02:11:57 +03:00
parent facc1e50a6
commit 1cafa36b98
67 changed files with 81 additions and 80 deletions

View File

@ -5,6 +5,7 @@ $finder = \PhpCsFixer\Finder::create()
->exclude('docker') ->exclude('docker')
->exclude('frontend') ->exclude('frontend')
->notPath('common/emails/views') ->notPath('common/emails/views')
->notPath('common/mail/layouts')
->notPath('/.*\/runtime/') ->notPath('/.*\/runtime/')
->notPath('autocompletion.php') ->notPath('autocompletion.php')
->notPath('tests/codeception/_output') ->notPath('tests/codeception/_output')

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional; namespace api\tests\functional;
use api\tests\_pages\AuthenticationRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use OTPHP\TOTP; use OTPHP\TOTP;
use api\tests\_pages\AuthenticationRoute;
class LoginCest { class LoginCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional; namespace api\tests\functional;
use Codeception\Example;
use api\tests\_pages\SignupRoute; use api\tests\_pages\SignupRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use Codeception\Example;
class RegisterCest { class RegisterCest {

View File

@ -3,9 +3,9 @@ declare(strict_types=1);
namespace api\tests\functional\_steps; namespace api\tests\functional\_steps;
use Ramsey\Uuid\Uuid;
use api\tests\_pages\AuthserverRoute; use api\tests\_pages\AuthserverRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use Ramsey\Uuid\Uuid;
class AuthserverSteps extends FunctionalTester { class AuthserverSteps extends FunctionalTester {

View File

@ -1,10 +1,10 @@
<?php <?php
namespace api\tests\functional\_steps; namespace api\tests\functional\_steps;
use common\rbac\Permissions as P;
use Faker\Provider\Uuid;
use api\tests\_pages\SessionServerRoute; use api\tests\_pages\SessionServerRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\rbac\Permissions as P;
use Faker\Provider\Uuid;
class SessionServerSteps extends FunctionalTester { class SessionServerSteps extends FunctionalTester {

View File

@ -1,10 +1,10 @@
<?php <?php
namespace api\tests\functional\accounts; namespace api\tests\functional\accounts;
use common\rbac\Permissions as P;
use api\tests\_pages\AccountsRoute; use api\tests\_pages\AccountsRoute;
use api\tests\functional\_steps\OauthSteps; use api\tests\functional\_steps\OauthSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\rbac\Permissions as P;
class BanCest { class BanCest {

View File

@ -1,11 +1,11 @@
<?php <?php
namespace api\tests\functional\accounts; namespace api\tests\functional\accounts;
use common\models\Account;
use api\tests\_pages\AccountsRoute; use api\tests\_pages\AccountsRoute;
use api\tests\_pages\AuthenticationRoute; use api\tests\_pages\AuthenticationRoute;
use api\tests\functional\_steps\OauthSteps; use api\tests\functional\_steps\OauthSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\models\Account;
class ChangePasswordCest { class ChangePasswordCest {

View File

@ -1,10 +1,10 @@
<?php <?php
namespace api\tests\functional\accounts; namespace api\tests\functional\accounts;
use common\models\Account;
use api\tests\_pages\AccountsRoute; use api\tests\_pages\AccountsRoute;
use api\tests\functional\_steps\OauthSteps; use api\tests\functional\_steps\OauthSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\models\Account;
class ChangeUsernameCest { class ChangeUsernameCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional\accounts; namespace api\tests\functional\accounts;
use OTPHP\TOTP;
use api\tests\_pages\AccountsRoute; use api\tests\_pages\AccountsRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use OTPHP\TOTP;
class DisableTwoFactorAuthCest { class DisableTwoFactorAuthCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional\accounts; namespace api\tests\functional\accounts;
use OTPHP\TOTP;
use api\tests\_pages\AccountsRoute; use api\tests\_pages\AccountsRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use OTPHP\TOTP;
class EnableTwoFactorAuthCest { class EnableTwoFactorAuthCest {

View File

@ -1,10 +1,10 @@
<?php <?php
namespace api\tests\functional\accounts; namespace api\tests\functional\accounts;
use common\rbac\Permissions as P;
use api\tests\_pages\AccountsRoute; use api\tests\_pages\AccountsRoute;
use api\tests\functional\_steps\OauthSteps; use api\tests\functional\_steps\OauthSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\rbac\Permissions as P;
class PardonCest { class PardonCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional\authserver; namespace api\tests\functional\authserver;
use Ramsey\Uuid\Uuid;
use api\tests\_pages\AuthserverRoute; use api\tests\_pages\AuthserverRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use Ramsey\Uuid\Uuid;
class AuthorizationCest { class AuthorizationCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional\authserver; namespace api\tests\functional\authserver;
use Ramsey\Uuid\Uuid;
use api\tests\_pages\AuthserverRoute; use api\tests\_pages\AuthserverRoute;
use api\tests\functional\_steps\AuthserverSteps; use api\tests\functional\_steps\AuthserverSteps;
use Ramsey\Uuid\Uuid;
class InvalidateCest { class InvalidateCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional\authserver; namespace api\tests\functional\authserver;
use Ramsey\Uuid\Uuid;
use api\tests\_pages\AuthserverRoute; use api\tests\_pages\AuthserverRoute;
use api\tests\functional\_steps\AuthserverSteps; use api\tests\functional\_steps\AuthserverSteps;
use Ramsey\Uuid\Uuid;
class RefreshCest { class RefreshCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional\authserver; namespace api\tests\functional\authserver;
use Ramsey\Uuid\Uuid;
use api\tests\_pages\AuthserverRoute; use api\tests\_pages\AuthserverRoute;
use api\tests\functional\_steps\AuthserverSteps; use api\tests\functional\_steps\AuthserverSteps;
use Ramsey\Uuid\Uuid;
class ValidateCest { class ValidateCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional\authserver; namespace api\tests\functional\authserver;
use Faker\Provider\Uuid;
use api\tests\_pages\MojangApiRoute; use api\tests\_pages\MojangApiRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use Faker\Provider\Uuid;
class UuidToUsernamesHistoryCest { class UuidToUsernamesHistoryCest {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace api\tests\functional\oauth; namespace api\tests\functional\oauth;
use common\rbac\Permissions as P;
use api\tests\_pages\OauthRoute; use api\tests\_pages\OauthRoute;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\rbac\Permissions as P;
class AuthCodeCest { class AuthCodeCest {

View File

@ -2,10 +2,10 @@
namespace api\tests\functional\oauth; namespace api\tests\functional\oauth;
use api\components\OAuth2\Storage\ScopeStorage as S; use api\components\OAuth2\Storage\ScopeStorage as S;
use common\rbac\Permissions as P;
use api\tests\_pages\OauthRoute; use api\tests\_pages\OauthRoute;
use api\tests\functional\_steps\OauthSteps; use api\tests\functional\_steps\OauthSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\rbac\Permissions as P;
class RefreshTokenCest { class RefreshTokenCest {

View File

@ -1,10 +1,10 @@
<?php <?php
namespace api\tests\functional\sessionserver; namespace api\tests\functional\sessionserver;
use Faker\Provider\Uuid;
use api\tests\_pages\SessionServerRoute; use api\tests\_pages\SessionServerRoute;
use api\tests\functional\_steps\SessionServerSteps; use api\tests\functional\_steps\SessionServerSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use Faker\Provider\Uuid;
class HasJoinedCest { class HasJoinedCest {

View File

@ -1,10 +1,10 @@
<?php <?php
namespace api\tests\functional\sessionserver; namespace api\tests\functional\sessionserver;
use Faker\Provider\Uuid;
use api\tests\_pages\SessionServerRoute; use api\tests\_pages\SessionServerRoute;
use api\tests\functional\_steps\SessionServerSteps; use api\tests\functional\_steps\SessionServerSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use Faker\Provider\Uuid;
class HasJoinedLegacyCest { class HasJoinedLegacyCest {

View File

@ -1,12 +1,12 @@
<?php <?php
namespace api\tests\functional\sessionserver; namespace api\tests\functional\sessionserver;
use common\rbac\Permissions as P;
use Faker\Provider\Uuid;
use api\tests\_pages\SessionServerRoute; use api\tests\_pages\SessionServerRoute;
use api\tests\functional\_steps\AuthserverSteps; use api\tests\functional\_steps\AuthserverSteps;
use api\tests\functional\_steps\OauthSteps; use api\tests\functional\_steps\OauthSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\rbac\Permissions as P;
use Faker\Provider\Uuid;
class JoinCest { class JoinCest {

View File

@ -1,12 +1,12 @@
<?php <?php
namespace api\tests\functional\sessionserver; namespace api\tests\functional\sessionserver;
use common\rbac\Permissions as P;
use Faker\Provider\Uuid;
use api\tests\_pages\SessionServerRoute; use api\tests\_pages\SessionServerRoute;
use api\tests\functional\_steps\AuthserverSteps; use api\tests\functional\_steps\AuthserverSteps;
use api\tests\functional\_steps\OauthSteps; use api\tests\functional\_steps\OauthSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use common\rbac\Permissions as P;
use Faker\Provider\Uuid;
class JoinLegacyCest { class JoinLegacyCest {

View File

@ -1,10 +1,10 @@
<?php <?php
namespace api\tests\functional\sessionserver; namespace api\tests\functional\sessionserver;
use Faker\Provider\Uuid;
use api\tests\_pages\SessionServerRoute; use api\tests\_pages\SessionServerRoute;
use api\tests\functional\_steps\SessionServerSteps; use api\tests\functional\_steps\SessionServerSteps;
use api\tests\FunctionalTester; use api\tests\FunctionalTester;
use Faker\Provider\Uuid;
class ProfileCest { class ProfileCest {

View File

@ -2,12 +2,12 @@
namespace codeception\api\unit\components\ReCaptcha; namespace codeception\api\unit\components\ReCaptcha;
use api\components\ReCaptcha\Validator; use api\components\ReCaptcha\Validator;
use api\tests\unit\TestCase;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
use phpmock\mockery\PHPMockery; use phpmock\mockery\PHPMockery;
use ReflectionClass; use ReflectionClass;
use api\tests\unit\TestCase;
class ValidatorTest extends TestCase { class ValidatorTest extends TestCase {

View File

@ -4,16 +4,16 @@ namespace codeception\api\unit\components\User;
use api\components\User\AuthenticationResult; use api\components\User\AuthenticationResult;
use api\components\User\Component; use api\components\User\Component;
use api\components\User\Identity; use api\components\User\Identity;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\AccountSession; use common\models\AccountSession;
use Emarref\Jwt\Claim;
use Emarref\Jwt\Jwt;
use Emarref\Jwt\Token;
use api\tests\unit\TestCase;
use common\tests\_support\ProtectedCaller; use common\tests\_support\ProtectedCaller;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\AccountSessionFixture; use common\tests\fixtures\AccountSessionFixture;
use common\tests\fixtures\MinecraftAccessKeyFixture; use common\tests\fixtures\MinecraftAccessKeyFixture;
use Emarref\Jwt\Claim;
use Emarref\Jwt\Jwt;
use Emarref\Jwt\Token;
use Yii; use Yii;
use yii\web\Request; use yii\web\Request;

View File

@ -2,6 +2,7 @@
namespace api\tests\unit\components\User; namespace api\tests\unit\components\User;
use api\components\User\AuthenticationResult; use api\components\User\AuthenticationResult;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\AccountSession; use common\models\AccountSession;
use Emarref\Jwt\Algorithm\Hs256; use Emarref\Jwt\Algorithm\Hs256;
@ -9,7 +10,6 @@ use Emarref\Jwt\Claim\Expiration;
use Emarref\Jwt\Encryption\Factory as EncryptionFactory; use Emarref\Jwt\Encryption\Factory as EncryptionFactory;
use Emarref\Jwt\Jwt; use Emarref\Jwt\Jwt;
use Emarref\Jwt\Token; use Emarref\Jwt\Token;
use api\tests\unit\TestCase;
class JwtAuthenticationResultTest extends TestCase { class JwtAuthenticationResultTest extends TestCase {

View File

@ -2,8 +2,8 @@
namespace codeception\api\unit\models; namespace codeception\api\unit\models;
use api\models\FeedbackForm; use api\models\FeedbackForm;
use common\models\Account;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\Account;
use yii\swiftmailer\Message; use yii\swiftmailer\Message;
class FeedbackFormTest extends TestCase { class FeedbackFormTest extends TestCase {

View File

@ -4,13 +4,13 @@ namespace codeception\api\unit\models;
use api\components\User\IdentityInterface; use api\components\User\IdentityInterface;
use api\components\User\Jwt; use api\components\User\Jwt;
use api\components\User\JwtIdentity; use api\components\User\JwtIdentity;
use api\tests\unit\TestCase;
use Codeception\Specify; use Codeception\Specify;
use common\tests\_support\ProtectedCaller;
use common\tests\fixtures\AccountFixture;
use Emarref\Jwt\Claim; use Emarref\Jwt\Claim;
use Emarref\Jwt\Encryption\Factory as EncryptionFactory; use Emarref\Jwt\Encryption\Factory as EncryptionFactory;
use Emarref\Jwt\Token; use Emarref\Jwt\Token;
use api\tests\unit\TestCase;
use common\tests\_support\ProtectedCaller;
use common\tests\fixtures\AccountFixture;
use Yii; use Yii;
class JwtIdentityTest extends TestCase { class JwtIdentityTest extends TestCase {

View File

@ -3,10 +3,10 @@ namespace api\tests\_support\models\authentication;
use api\components\User\AuthenticationResult; use api\components\User\AuthenticationResult;
use api\models\authentication\ConfirmEmailForm; use api\models\authentication\ConfirmEmailForm;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\AccountSession; use common\models\AccountSession;
use common\models\EmailActivation; use common\models\EmailActivation;
use api\tests\unit\TestCase;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;
class ConfirmEmailFormTest extends TestCase { class ConfirmEmailFormTest extends TestCase {

View File

@ -3,14 +3,14 @@ namespace codeception\api\unit\models\authentication;
use api\components\ReCaptcha\Validator as ReCaptchaValidator; use api\components\ReCaptcha\Validator as ReCaptchaValidator;
use api\models\authentication\ForgotPasswordForm; use api\models\authentication\ForgotPasswordForm;
use api\tests\unit\TestCase;
use Codeception\Specify; use Codeception\Specify;
use common\models\Account; use common\models\Account;
use common\models\EmailActivation; use common\models\EmailActivation;
use common\tasks\SendPasswordRecoveryEmail; use common\tasks\SendPasswordRecoveryEmail;
use GuzzleHttp\ClientInterface;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;
use GuzzleHttp\ClientInterface;
use Yii; use Yii;
class ForgotPasswordFormTest extends TestCase { class ForgotPasswordFormTest extends TestCase {

View File

@ -3,11 +3,11 @@ namespace api\tests\_support\models\authentication;
use api\components\User\AuthenticationResult; use api\components\User\AuthenticationResult;
use api\models\authentication\LoginForm; use api\models\authentication\LoginForm;
use api\tests\unit\TestCase;
use Codeception\Specify; use Codeception\Specify;
use common\models\Account; use common\models\Account;
use OTPHP\TOTP;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use OTPHP\TOTP;
class LoginFormTest extends TestCase { class LoginFormTest extends TestCase {
use Specify; use Specify;

View File

@ -4,9 +4,9 @@ namespace api\tests\_support\models\authentication;
use api\components\User\Component; use api\components\User\Component;
use api\components\User\Identity; use api\components\User\Identity;
use api\models\authentication\LogoutForm; use api\models\authentication\LogoutForm;
use api\tests\unit\TestCase;
use Codeception\Specify; use Codeception\Specify;
use common\models\AccountSession; use common\models\AccountSession;
use api\tests\unit\TestCase;
use Yii; use Yii;
class LogoutFormTest extends TestCase { class LogoutFormTest extends TestCase {

View File

@ -3,10 +3,10 @@ namespace api\tests\_support\models\authentication;
use api\components\User\AuthenticationResult; use api\components\User\AuthenticationResult;
use api\models\authentication\RecoverPasswordForm; use api\models\authentication\RecoverPasswordForm;
use api\tests\unit\TestCase;
use Codeception\Specify; use Codeception\Specify;
use common\models\Account; use common\models\Account;
use common\models\EmailActivation; use common\models\EmailActivation;
use api\tests\unit\TestCase;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;
class RecoverPasswordFormTest extends TestCase { class RecoverPasswordFormTest extends TestCase {

View File

@ -3,9 +3,9 @@ namespace codeception\api\unit\models\authentication;
use api\components\User\AuthenticationResult; use api\components\User\AuthenticationResult;
use api\models\authentication\RefreshTokenForm; use api\models\authentication\RefreshTokenForm;
use api\tests\unit\TestCase;
use Codeception\Specify; use Codeception\Specify;
use common\models\AccountSession; use common\models\AccountSession;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountSessionFixture; use common\tests\fixtures\AccountSessionFixture;
class RefreshTokenFormTest extends TestCase { class RefreshTokenFormTest extends TestCase {

View File

@ -3,16 +3,16 @@ namespace api\tests\_support\models\authentication;
use api\components\ReCaptcha\Validator as ReCaptchaValidator; use api\components\ReCaptcha\Validator as ReCaptchaValidator;
use api\models\authentication\RegistrationForm; use api\models\authentication\RegistrationForm;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\EmailActivation; use common\models\EmailActivation;
use common\models\UsernameHistory; use common\models\UsernameHistory;
use common\tasks\SendRegistrationEmail; use common\tasks\SendRegistrationEmail;
use GuzzleHttp\ClientInterface;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;
use common\tests\fixtures\UsernameHistoryFixture; use common\tests\fixtures\UsernameHistoryFixture;
use common\tests\helpers\Mock; use common\tests\helpers\Mock;
use GuzzleHttp\ClientInterface;
use Yii; use Yii;
use yii\validators\EmailValidator; use yii\validators\EmailValidator;
use yii\web\Request; use yii\web\Request;

View File

@ -3,13 +3,13 @@ namespace api\tests\_support\models\authentication;
use api\components\ReCaptcha\Validator as ReCaptchaValidator; use api\components\ReCaptcha\Validator as ReCaptchaValidator;
use api\models\authentication\RepeatAccountActivationForm; use api\models\authentication\RepeatAccountActivationForm;
use api\tests\unit\TestCase;
use Codeception\Specify; use Codeception\Specify;
use common\models\EmailActivation; use common\models\EmailActivation;
use common\tasks\SendRegistrationEmail; use common\tasks\SendRegistrationEmail;
use GuzzleHttp\ClientInterface;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;
use GuzzleHttp\ClientInterface;
use Yii; use Yii;
class RepeatAccountActivationFormTest extends TestCase { class RepeatAccountActivationFormTest extends TestCase {

View File

@ -2,8 +2,8 @@
namespace api\tests\unit\modules\accounts\models; namespace api\tests\unit\modules\accounts\models;
use api\modules\accounts\models\AcceptRulesForm; use api\modules\accounts\models\AcceptRulesForm;
use common\models\Account;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\Account;
use const common\LATEST_RULES_VERSION; use const common\LATEST_RULES_VERSION;
class AcceptRulesFormTest extends TestCase { class AcceptRulesFormTest extends TestCase {

View File

@ -2,9 +2,9 @@
namespace api\tests\unit\modules\accounts\models; namespace api\tests\unit\modules\accounts\models;
use api\modules\accounts\models\ChangeEmailForm; use api\modules\accounts\models\ChangeEmailForm;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\EmailActivation; use common\models\EmailActivation;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;

View File

@ -2,8 +2,8 @@
namespace api\tests\unit\modules\accounts\models; namespace api\tests\unit\modules\accounts\models;
use api\modules\accounts\models\ChangeLanguageForm; use api\modules\accounts\models\ChangeLanguageForm;
use common\models\Account;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\Account;
class ChangeLanguageFormTest extends TestCase { class ChangeLanguageFormTest extends TestCase {

View File

@ -4,10 +4,10 @@ namespace api\tests\unit\modules\accounts\models;
use api\components\User\Component; use api\components\User\Component;
use api\components\User\Identity; use api\components\User\Identity;
use api\modules\accounts\models\ChangePasswordForm; use api\modules\accounts\models\ChangePasswordForm;
use api\tests\unit\TestCase;
use common\components\UserPass; use common\components\UserPass;
use common\helpers\Error as E; use common\helpers\Error as E;
use common\models\Account; use common\models\Account;
use api\tests\unit\TestCase;
use Yii; use Yii;
use yii\db\Transaction; use yii\db\Transaction;

View File

@ -2,10 +2,10 @@
namespace api\tests\unit\modules\accounts\models; namespace api\tests\unit\modules\accounts\models;
use api\modules\accounts\models\ChangeUsernameForm; use api\modules\accounts\models\ChangeUsernameForm;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\UsernameHistory; use common\models\UsernameHistory;
use common\tasks\PullMojangUsername; use common\tasks\PullMojangUsername;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\UsernameHistoryFixture; use common\tests\fixtures\UsernameHistoryFixture;

View File

@ -2,9 +2,9 @@
namespace api\tests\unit\modules\accounts\models; namespace api\tests\unit\modules\accounts\models;
use api\modules\accounts\models\DisableTwoFactorAuthForm; use api\modules\accounts\models\DisableTwoFactorAuthForm;
use api\tests\unit\TestCase;
use common\helpers\Error as E; use common\helpers\Error as E;
use common\models\Account; use common\models\Account;
use api\tests\unit\TestCase;
class DisableTwoFactorAuthFormTest extends TestCase { class DisableTwoFactorAuthFormTest extends TestCase {

View File

@ -4,9 +4,9 @@ namespace api\tests\unit\modules\accounts\models;
use api\components\User\Component; use api\components\User\Component;
use api\components\User\Identity; use api\components\User\Identity;
use api\modules\accounts\models\EnableTwoFactorAuthForm; use api\modules\accounts\models\EnableTwoFactorAuthForm;
use api\tests\unit\TestCase;
use common\helpers\Error as E; use common\helpers\Error as E;
use common\models\Account; use common\models\Account;
use api\tests\unit\TestCase;
use Yii; use Yii;
class EnableTwoFactorAuthFormTest extends TestCase { class EnableTwoFactorAuthFormTest extends TestCase {

View File

@ -2,11 +2,11 @@
namespace api\tests\unit\modules\accounts\models; namespace api\tests\unit\modules\accounts\models;
use api\modules\accounts\models\SendEmailVerificationForm; use api\modules\accounts\models\SendEmailVerificationForm;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\confirmations\CurrentEmailConfirmation; use common\models\confirmations\CurrentEmailConfirmation;
use common\models\EmailActivation; use common\models\EmailActivation;
use common\tasks\SendCurrentEmailConfirmation; use common\tasks\SendCurrentEmailConfirmation;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;

View File

@ -2,11 +2,11 @@
namespace api\tests\unit\modules\accounts\models; namespace api\tests\unit\modules\accounts\models;
use api\modules\accounts\models\SendNewEmailVerificationForm; use api\modules\accounts\models\SendNewEmailVerificationForm;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\confirmations\NewEmailConfirmation; use common\models\confirmations\NewEmailConfirmation;
use common\models\EmailActivation; use common\models\EmailActivation;
use common\tasks\SendNewEmailConfirmation; use common\tasks\SendNewEmailConfirmation;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;
use common\tests\helpers\Mock; use common\tests\helpers\Mock;

View File

@ -2,8 +2,8 @@
namespace api\tests\unit\modules\accounts\models; namespace api\tests\unit\modules\accounts\models;
use api\modules\accounts\models\TwoFactorAuthInfo; use api\modules\accounts\models\TwoFactorAuthInfo;
use common\models\Account;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\Account;
class TwoFactorAuthInfoTest extends TestCase { class TwoFactorAuthInfoTest extends TestCase {

View File

@ -4,13 +4,13 @@ namespace codeception\api\unit\modules\authserver\models;
use api\models\authentication\LoginForm; use api\models\authentication\LoginForm;
use api\modules\authserver\models\AuthenticateData; use api\modules\authserver\models\AuthenticateData;
use api\modules\authserver\models\AuthenticationForm; use api\modules\authserver\models\AuthenticationForm;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\models\MinecraftAccessKey; use common\models\MinecraftAccessKey;
use Ramsey\Uuid\Uuid;
use api\tests\unit\TestCase;
use common\tests\_support\ProtectedCaller; use common\tests\_support\ProtectedCaller;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\fixtures\MinecraftAccessKeyFixture; use common\tests\fixtures\MinecraftAccessKeyFixture;
use Ramsey\Uuid\Uuid;
class AuthenticationFormTest extends TestCase { class AuthenticationFormTest extends TestCase {
use ProtectedCaller; use ProtectedCaller;

View File

@ -3,9 +3,9 @@ namespace api\tests\unit\modules\internal\models;
use api\modules\accounts\models\BanAccountForm; use api\modules\accounts\models\BanAccountForm;
use api\modules\internal\helpers\Error as E; use api\modules\internal\helpers\Error as E;
use api\tests\unit\TestCase;
use common\models\Account; use common\models\Account;
use common\tasks\ClearAccountSessions; use common\tasks\ClearAccountSessions;
use api\tests\unit\TestCase;
class BanFormTest extends TestCase { class BanFormTest extends TestCase {

View File

@ -3,8 +3,8 @@ namespace api\tests\unit\modules\internal\models;
use api\modules\accounts\models\PardonAccountForm; use api\modules\accounts\models\PardonAccountForm;
use api\modules\internal\helpers\Error as E; use api\modules\internal\helpers\Error as E;
use common\models\Account;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\Account;
class PardonFormTest extends TestCase { class PardonFormTest extends TestCase {

View File

@ -2,8 +2,8 @@
namespace api\tests\unit\modules\oauth\models; namespace api\tests\unit\modules\oauth\models;
use api\modules\oauth\models\ApplicationType; use api\modules\oauth\models\ApplicationType;
use common\models\OauthClient;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\OauthClient;
class ApplicationTypeTest extends TestCase { class ApplicationTypeTest extends TestCase {

View File

@ -2,8 +2,8 @@
namespace api\tests\unit\modules\oauth\models; namespace api\tests\unit\modules\oauth\models;
use api\modules\oauth\models\BaseOauthClientType; use api\modules\oauth\models\BaseOauthClientType;
use common\models\OauthClient;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\OauthClient;
class BaseOauthClientTypeTest extends TestCase { class BaseOauthClientTypeTest extends TestCase {

View File

@ -2,8 +2,8 @@
namespace api\tests\unit\modules\oauth\models; namespace api\tests\unit\modules\oauth\models;
use api\modules\oauth\models\MinecraftServerType; use api\modules\oauth\models\MinecraftServerType;
use common\models\OauthClient;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\OauthClient;
class MinecraftServerTypeTest extends TestCase { class MinecraftServerTypeTest extends TestCase {

View File

@ -4,8 +4,8 @@ namespace api\tests\unit\modules\oauth\models;
use api\modules\oauth\models\ApplicationType; use api\modules\oauth\models\ApplicationType;
use api\modules\oauth\models\MinecraftServerType; use api\modules\oauth\models\MinecraftServerType;
use api\modules\oauth\models\OauthClientFormFactory; use api\modules\oauth\models\OauthClientFormFactory;
use common\models\OauthClient;
use api\tests\unit\TestCase; use api\tests\unit\TestCase;
use common\models\OauthClient;
class OauthClientFormFactoryTest extends TestCase { class OauthClientFormFactoryTest extends TestCase {

View File

@ -3,9 +3,9 @@ namespace api\tests\unit\modules\oauth\models;
use api\modules\oauth\models\OauthClientForm; use api\modules\oauth\models\OauthClientForm;
use api\modules\oauth\models\OauthClientTypeForm; use api\modules\oauth\models\OauthClientTypeForm;
use api\tests\unit\TestCase;
use common\models\OauthClient; use common\models\OauthClient;
use common\tasks\ClearOauthSessions; use common\tasks\ClearOauthSessions;
use api\tests\unit\TestCase;
class OauthClientFormTest extends TestCase { class OauthClientFormTest extends TestCase {

View File

@ -4,9 +4,9 @@ declare(strict_types=1);
namespace api\tests\unit\modules\session\filters; namespace api\tests\unit\modules\session\filters;
use api\modules\session\filters\RateLimiter; use api\modules\session\filters\RateLimiter;
use api\tests\unit\TestCase;
use common\models\OauthClient; use common\models\OauthClient;
use Faker\Provider\Internet; use Faker\Provider\Internet;
use api\tests\unit\TestCase;
use Yii; use Yii;
use yii\redis\Connection; use yii\redis\Connection;
use yii\web\Request; use yii\web\Request;

View File

@ -1,10 +1,10 @@
<?php <?php
namespace api\tests\_support\traits; namespace api\tests\_support\traits;
use api\tests\unit\TestCase;
use api\traits\AccountFinder; use api\traits\AccountFinder;
use Codeception\Specify; use Codeception\Specify;
use common\models\Account; use common\models\Account;
use api\tests\unit\TestCase;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
class AccountFinderTest extends TestCase { class AccountFinderTest extends TestCase {

View File

@ -1,12 +1,12 @@
<?php <?php
namespace codeception\api\unit\validators; namespace codeception\api\unit\validators;
use api\tests\unit\TestCase;
use api\validators\EmailActivationKeyValidator; use api\validators\EmailActivationKeyValidator;
use Codeception\Specify; use Codeception\Specify;
use common\helpers\Error as E; use common\helpers\Error as E;
use common\models\confirmations\ForgotPassword; use common\models\confirmations\ForgotPassword;
use common\models\EmailActivation; use common\models\EmailActivation;
use api\tests\unit\TestCase;
use common\tests\_support\ProtectedCaller; use common\tests\_support\ProtectedCaller;
use common\tests\fixtures\EmailActivationFixture; use common\tests\fixtures\EmailActivationFixture;
use yii\base\Model; use yii\base\Model;

View File

@ -1,11 +1,11 @@
<?php <?php
namespace codeception\api\unit\validators; namespace codeception\api\unit\validators;
use api\tests\unit\TestCase;
use api\validators\PasswordRequiredValidator; use api\validators\PasswordRequiredValidator;
use common\helpers\Error as E; use common\helpers\Error as E;
use common\models\Account; use common\models\Account;
use common\rbac\Permissions as P; use common\rbac\Permissions as P;
use api\tests\unit\TestCase;
use common\tests\_support\ProtectedCaller; use common\tests\_support\ProtectedCaller;
use yii\web\User; use yii\web\User;

View File

@ -1,12 +1,12 @@
<?php <?php
namespace api\tests\unit\validators; namespace api\tests\unit\validators;
use api\tests\unit\TestCase;
use api\validators\TotpValidator; use api\validators\TotpValidator;
use common\helpers\Error as E; use common\helpers\Error as E;
use common\models\Account; use common\models\Account;
use OTPHP\TOTP;
use api\tests\unit\TestCase;
use common\tests\_support\ProtectedCaller; use common\tests\_support\ProtectedCaller;
use OTPHP\TOTP;
class TotpValidatorTest extends TestCase { class TotpValidatorTest extends TestCase {
use ProtectedCaller; use ProtectedCaller;

View File

@ -3,11 +3,11 @@ namespace common\tests\unit\components\Mojang;
use common\components\Mojang\Api; use common\components\Mojang\Api;
use common\components\Mojang\response\UsernameToUUIDResponse; use common\components\Mojang\response\UsernameToUUIDResponse;
use common\tests\unit\TestCase;
use GuzzleHttp\Client as GuzzleClient; use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack; use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
use common\tests\unit\TestCase;
use Yii; use Yii;
class ApiTest extends TestCase { class ApiTest extends TestCase {

View File

@ -3,9 +3,9 @@ namespace common\tests\unit\emails;
use common\components\EmailRenderer; use common\components\EmailRenderer;
use common\emails\TemplateWithRenderer; use common\emails\TemplateWithRenderer;
use Ely\Email\TemplateBuilder;
use common\tests\_support\ProtectedCaller; use common\tests\_support\ProtectedCaller;
use common\tests\unit\TestCase; use common\tests\unit\TestCase;
use Ely\Email\TemplateBuilder;
use yii\mail\MailerInterface; use yii\mail\MailerInterface;
use yii\mail\MessageInterface; use yii\mail\MessageInterface;

View File

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace common\tests\unit\tasks; namespace common\tests\unit\tasks;
use common\tasks\DeliveryWebHook; use common\tasks\DeliveryWebHook;
use common\tests\unit\TestCase;
use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\ServerException; use GuzzleHttp\Exception\ServerException;
use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\Handler\MockHandler;
@ -11,7 +12,6 @@ use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware; use GuzzleHttp\Middleware;
use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
use common\tests\unit\TestCase;
use yii\queue\Queue; use yii\queue\Queue;
/** /**

View File

@ -1,10 +1,10 @@
<?php <?php
namespace common\tests\unit\validators; namespace common\tests\unit\validators;
use common\validators\EmailValidator;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\helpers\Mock; use common\tests\helpers\Mock;
use common\tests\unit\TestCase; use common\tests\unit\TestCase;
use common\validators\EmailValidator;
use yii\base\Model; use yii\base\Model;
use yii\validators\EmailValidator as YiiEmailValidator; use yii\validators\EmailValidator as YiiEmailValidator;

View File

@ -3,8 +3,8 @@ declare(strict_types=1);
namespace common\tests\unit\validators; namespace common\tests\unit\validators;
use common\validators\LanguageValidator;
use common\tests\unit\TestCase; use common\tests\unit\TestCase;
use common\validators\LanguageValidator;
/** /**
* @covers \common\validators\LanguageValidator * @covers \common\validators\LanguageValidator

View File

@ -1,8 +1,8 @@
<?php <?php
namespace common\tests\unit\validators; namespace common\tests\unit\validators;
use common\validators\MinecraftServerAddressValidator;
use common\tests\unit\TestCase; use common\tests\unit\TestCase;
use common\validators\MinecraftServerAddressValidator;
class MinecraftServerAddressValidatorTest extends TestCase { class MinecraftServerAddressValidatorTest extends TestCase {

View File

@ -1,9 +1,9 @@
<?php <?php
namespace common\tests\unit\validators; namespace common\tests\unit\validators;
use common\validators\UsernameValidator;
use common\tests\fixtures\AccountFixture; use common\tests\fixtures\AccountFixture;
use common\tests\unit\TestCase; use common\tests\unit\TestCase;
use common\validators\UsernameValidator;
use yii\base\Model; use yii\base\Model;
class UsernameValidatorTest extends TestCase { class UsernameValidatorTest extends TestCase {

View File

@ -2,9 +2,9 @@
namespace common\tests\unit\validators; namespace common\tests\unit\validators;
use Codeception\Specify; use Codeception\Specify;
use common\tests\unit\TestCase;
use common\validators\UuidValidator; use common\validators\UuidValidator;
use Faker\Provider\Uuid; use Faker\Provider\Uuid;
use common\tests\unit\TestCase;
use yii\base\Model; use yii\base\Model;
class UuidValidatorTest extends TestCase { class UuidValidatorTest extends TestCase {