This is a skills test code. The idea is created a simple blog.
- Clone the repository.
- Run
composer install
. - Configure the database. The STAGE and TEST databases must be the same.
- Generate pair key for auth
php bin/console lexik:jwt:generate-keypair
- Create the database with the command
php bin/console doctrine:database:create
. - Run the migrations with the command
php bin/console doctrine:migrations:migrate -n
. - Load the fixtures with the command
php bin/console doctrine:fixtures:load -n
. - Configure TEST_URL for testing (in the env.test file).
- Run the tests.
- The file
Blog.postman_collection.json
contains all endpoints, with example request for errors. - This blog has a admin panel zone, for access got to url
\admin
. - Have two user for log in this panel:
'email' => 'admin@email.test', 'password' => 'password1admin'
This user is admin and can see all articles and users, and active them.'email' => 'test@email.test', 'password' => 'password1'
This user only see his articles.
- Email must activate the user, if the sent don't work (Is a three party email sender), the
admin
user can be activate users in the panel control. - For the events send an email and generate of slugs of user and articles, must be use the command
php bin/console messenger:consume events -vv