diff --git a/codeception.dist.yml b/codeception.dist.yml index 7aa3d10..f90b32a 100644 --- a/codeception.dist.yml +++ b/codeception.dist.yml @@ -11,7 +11,7 @@ settings: modules: config: Db: - dsn: 'mysql:host=localhost;dbname=yii2-usuario-test' + dsn: 'mysql:host=127.0.0.1;dbname=yii2-usuario-test' user: 'root' password: '' dump: tests/_data/schema.sql diff --git a/composer.json b/composer.json index f4f3521..2c27cc8 100644 --- a/composer.json +++ b/composer.json @@ -48,6 +48,7 @@ "require": { "php": ">=5.5", "2amigos/yii2-selectize-widget": "^1.1", + "yiisoft/yii2": ">=2.0.9", "yiisoft/yii2-authclient": "^2.1", "yiisoft/yii2-bootstrap": "^2.0", "yiisoft/yii2-swiftmailer": "^2.0", @@ -55,7 +56,6 @@ "2amigos/qrcode-library": "^1.1" }, "require-dev": { - "cebe/assetfree-yii2": "~2.0.0", "friendsofphp/php-cs-fixer": "^2.3", "squizlabs/php_codesniffer": "*", "phpmd/phpmd": "@stable", diff --git a/tests/_app/config/db.php b/tests/_app/config/db.php index 0c6cbc6..ef85450 100644 --- a/tests/_app/config/db.php +++ b/tests/_app/config/db.php @@ -2,7 +2,7 @@ $db = [ 'class' => 'yii\db\Connection', - 'dsn' => 'mysql:host=127.0.0.1;dbname=yii2-usuario-test', + 'dsn' => 'mysql:host=localhost;dbname=yii2-usuario-test', 'username' => 'root', 'password' => '', 'charset' => 'utf8', diff --git a/tests/_data/schema.sql b/tests/_data/schema.sql index db846e6..a700996 100644 --- a/tests/_data/schema.sql +++ b/tests/_data/schema.sql @@ -69,6 +69,8 @@ CREATE TABLE `user` ( `blocked_at` int(11) DEFAULT NULL, `created_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL, + `auth_tf_key` varchar(16) DEFAULT NULL, + `auth_tf_enabled` tinyint(1) DEFAULT '0', `flags` int(11) NOT NULL DEFAULT '0', `last_login_at` int(11) DEFAULT NULL, diff --git a/tests/_fixtures/data/user.php b/tests/_fixtures/data/user.php index 9d2ebf3..476be9e 100644 --- a/tests/_fixtures/data/user.php +++ b/tests/_fixtures/data/user.php @@ -9,6 +9,8 @@ return [ 'email' => 'user@example.com', 'password_hash' => '$2y$13$qY.ImaYBppt66qez6B31QO92jc5DYVRzo5NxM1ivItkW74WsSG6Ui', 'auth_key' => '39HU0m5lpjWtqstFVGFjj6lFb7UZDeRq', + 'auth_tf_key' => '', + 'auth_tf_enabled' => false, 'created_at' => $time, 'updated_at' => $time, 'confirmed_at' => $time, @@ -19,6 +21,8 @@ return [ 'email' => 'joe@example.com', 'password_hash' => '$2y$13$CIH1LSMPzU9xDCywt3QO8uovAu2axp8hwuXVa72oI.1G/USsGyMBS', 'auth_key' => 'mhh1A6KfqQLmHP-MiWN0WB0M90Q2u5OE', + 'auth_tf_key' => '', + 'auth_tf_enabled' => false, 'created_at' => $time, 'updated_at' => $time, ], @@ -28,6 +32,8 @@ return [ 'email' => 'john@example.com', 'password_hash' => '$2y$13$qY.ImaYBppt66qez6B31QO92jc5DYVRzo5NxM1ivItkW74WsSG6Ui', 'auth_key' => 'h6OS9csJbZEOW59ZILmJxU6bCiqVno9A', + 'auth_tf_key' => '', + 'auth_tf_enabled' => false, 'created_at' => $time - 86401, 'updated_at' => $time - 86401, ], @@ -37,6 +43,8 @@ return [ 'email' => 'steven@example.com', 'password_hash' => '$2y$13$qY.ImaYBppt66qez6B31QO92jc5DYVRzo5NxM1ivItkW74WsSG6Ui', 'auth_key' => 'TnXTrtLdj-YJBlG2A6jFHJreKgbsLYCa', + 'auth_tf_key' => '', + 'auth_tf_enabled' => false, 'created_at' => $time, 'updated_at' => $time, 'blocked_at' => $time, @@ -58,6 +66,8 @@ return [ 'email' => 'alex@example.com', 'password_hash' => '$2y$13$qY.ImaYBppt66qez6B31QO92jc5DYVRzo5NxM1ivItkW74WsSG6Ui', 'auth_key' => 'zQh1A65We0AmHPOMiWN0WB0M90Q24ziU', + 'auth_tf_key' => '', + 'auth_tf_enabled' => false, 'created_at' => $time, 'updated_at' => $time, 'confirmed_at' => $time,