Loading README.md +13 −1 Original line number Diff line number Diff line Loading @@ -41,9 +41,16 @@ ## Инструкция ## Создание БД для тестов 1. Войти в консоль - `make shell` 2. Запустить - `bin/console --env=test doctrine:database:create` 3. Запустить - `bin/console --env=test doctrine:schema:create` ## Воркер отправки Email квестов Запустить команду - `bin/console messenger:consume -v scheduler_quests` 1. Войти в консоль - `make shell` 2. Запустить команду - `bin/console messenger:consume -v scheduler_quests` ## Kafka <details> Loading @@ -60,6 +67,11 @@ </details> ## Тестирование 1. Войти в консоль - `make shell` 2. Запустить команду - `bin/phpunit` ## Postman Импортировать в Postman `{URL}/api/doc.json` Loading app/.env.test 0 → 100644 +6 −0 Original line number Diff line number Diff line # define your env variables for the test env here KERNEL_CLASS='App\Kernel' APP_SECRET='$ecretf0rt3st' SYMFONY_DEPRECATIONS_HELPER=999999 PANTHER_APP_ENV=panther PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots app/.gitignore +10 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,13 @@ ###> lexik/jwt-authentication-bundle ### /config/jwt/*.pem ###< lexik/jwt-authentication-bundle ### ###> symfony/phpunit-bridge ### .phpunit.result.cache /phpunit.xml ###< symfony/phpunit-bridge ### ###> phpunit/phpunit ### /phpunit.xml .phpunit.result.cache ###< phpunit/phpunit ### app/bin/phpunit 0 → 100755 +23 −0 Original line number Diff line number Diff line #!/usr/bin/env php <?php if (!ini_get('date.timezone')) { ini_set('date.timezone', 'UTC'); } if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { if (PHP_VERSION_ID >= 80000) { require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; } else { define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); require PHPUNIT_COMPOSER_INSTALL; PHPUnit\TextUI\Command::main(); } } else { if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; exit(1); } require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; } app/composer.json +16 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ "ext-ctype": "*", "ext-iconv": "*", "ext-rdkafka": "*", "api-platform/core": "^3.3", "doctrine/dbal": "^3", "doctrine/doctrine-bundle": "^2.12", "doctrine/doctrine-migrations-bundle": "^3.3", Loading @@ -15,17 +16,22 @@ "lexik/jwt-authentication-bundle": "^3.0", "nelmio/api-doc-bundle": "^4.27", "nelmio/cors-bundle": "^2.5", "phpdocumentor/reflection-docblock": "^5.4", "phpstan/phpdoc-parser": "^1.29", "predis/predis": "^2.2", "symfony/asset": "7.0.*", "symfony/cache": "7.0.*", "symfony/console": "7.0.*", "symfony/dotenv": "7.0.*", "symfony/expression-language": "7.0.*", "symfony/filesystem": "7.0.*", "symfony/flex": "^2", "symfony/framework-bundle": "7.0.*", "symfony/mailer": "7.0.*", "symfony/messenger": "7.0.*", "symfony/mime": "7.0.*", "symfony/property-access": "7.0.*", "symfony/property-info": "7.0.*", "symfony/runtime": "7.0.*", "symfony/scheduler": "7.0.*", "symfony/security-bundle": "7.0.*", Loading @@ -37,8 +43,17 @@ "twig/twig": "^2.12|^3.0" }, "require-dev": { "dama/doctrine-test-bundle": "^8.2", "doctrine/doctrine-fixtures-bundle": "^3.6", "liip/test-fixtures-bundle": "^3.0", "phpunit/phpunit": "^9.5", "roave/security-advisories": "dev-latest", "symfony/maker-bundle": "^1.59" "symfony/browser-kit": "7.0.*", "symfony/css-selector": "7.0.*", "symfony/http-client": "7.0.*", "symfony/maker-bundle": "^1.59", "symfony/phpunit-bridge": "^7.1", "zenstruck/messenger-test": "^1.9" }, "config": { "allow-plugins": { Loading Loading
README.md +13 −1 Original line number Diff line number Diff line Loading @@ -41,9 +41,16 @@ ## Инструкция ## Создание БД для тестов 1. Войти в консоль - `make shell` 2. Запустить - `bin/console --env=test doctrine:database:create` 3. Запустить - `bin/console --env=test doctrine:schema:create` ## Воркер отправки Email квестов Запустить команду - `bin/console messenger:consume -v scheduler_quests` 1. Войти в консоль - `make shell` 2. Запустить команду - `bin/console messenger:consume -v scheduler_quests` ## Kafka <details> Loading @@ -60,6 +67,11 @@ </details> ## Тестирование 1. Войти в консоль - `make shell` 2. Запустить команду - `bin/phpunit` ## Postman Импортировать в Postman `{URL}/api/doc.json` Loading
app/.env.test 0 → 100644 +6 −0 Original line number Diff line number Diff line # define your env variables for the test env here KERNEL_CLASS='App\Kernel' APP_SECRET='$ecretf0rt3st' SYMFONY_DEPRECATIONS_HELPER=999999 PANTHER_APP_ENV=panther PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
app/.gitignore +10 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,13 @@ ###> lexik/jwt-authentication-bundle ### /config/jwt/*.pem ###< lexik/jwt-authentication-bundle ### ###> symfony/phpunit-bridge ### .phpunit.result.cache /phpunit.xml ###< symfony/phpunit-bridge ### ###> phpunit/phpunit ### /phpunit.xml .phpunit.result.cache ###< phpunit/phpunit ###
app/bin/phpunit 0 → 100755 +23 −0 Original line number Diff line number Diff line #!/usr/bin/env php <?php if (!ini_get('date.timezone')) { ini_set('date.timezone', 'UTC'); } if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { if (PHP_VERSION_ID >= 80000) { require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; } else { define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); require PHPUNIT_COMPOSER_INSTALL; PHPUnit\TextUI\Command::main(); } } else { if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; exit(1); } require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; }
app/composer.json +16 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ "ext-ctype": "*", "ext-iconv": "*", "ext-rdkafka": "*", "api-platform/core": "^3.3", "doctrine/dbal": "^3", "doctrine/doctrine-bundle": "^2.12", "doctrine/doctrine-migrations-bundle": "^3.3", Loading @@ -15,17 +16,22 @@ "lexik/jwt-authentication-bundle": "^3.0", "nelmio/api-doc-bundle": "^4.27", "nelmio/cors-bundle": "^2.5", "phpdocumentor/reflection-docblock": "^5.4", "phpstan/phpdoc-parser": "^1.29", "predis/predis": "^2.2", "symfony/asset": "7.0.*", "symfony/cache": "7.0.*", "symfony/console": "7.0.*", "symfony/dotenv": "7.0.*", "symfony/expression-language": "7.0.*", "symfony/filesystem": "7.0.*", "symfony/flex": "^2", "symfony/framework-bundle": "7.0.*", "symfony/mailer": "7.0.*", "symfony/messenger": "7.0.*", "symfony/mime": "7.0.*", "symfony/property-access": "7.0.*", "symfony/property-info": "7.0.*", "symfony/runtime": "7.0.*", "symfony/scheduler": "7.0.*", "symfony/security-bundle": "7.0.*", Loading @@ -37,8 +43,17 @@ "twig/twig": "^2.12|^3.0" }, "require-dev": { "dama/doctrine-test-bundle": "^8.2", "doctrine/doctrine-fixtures-bundle": "^3.6", "liip/test-fixtures-bundle": "^3.0", "phpunit/phpunit": "^9.5", "roave/security-advisories": "dev-latest", "symfony/maker-bundle": "^1.59" "symfony/browser-kit": "7.0.*", "symfony/css-selector": "7.0.*", "symfony/http-client": "7.0.*", "symfony/maker-bundle": "^1.59", "symfony/phpunit-bridge": "^7.1", "zenstruck/messenger-test": "^1.9" }, "config": { "allow-plugins": { Loading