Skip to content

lorenzoalulithos/david-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

David Test

Here we are with David Test

Description

📋 To-Do — Gestione Prodotti e Categorie

  • Creazione Modello Product con campi price, color e category_id
  • Creazione Modello Category con campo name (Per generarli puoi utilizzare un piccolo seeder)
  • Realizzazione FE (non serve curare lo stile) con lista dei prodotti e filtri dinamici su color e category (Mi piacerebbe usassi alpine anche in CDN, hai piena autonomia)
  • Piccolo form di creazione/aggiornamento prodotto
  • Creazione di un paio di test (ce gia installato phpunit, ma puoi usare anche pest)

Startup

Start DDEV

ddev start

Install php dependencies

ddev composer install

Run database migration

The project uses two database:

  • For local environment: db
  • For testing environment: db_test

Migrations on db_test are not required since RefreshDatabase trait is used. See Resetting The Database After Each Test for more information.

ddev php artisan migrate

Run seeders

ddev php artisan db:seed

To set up a fresh version of database and run seeders at the same time:

ddev php artisan migrate:fresh --seed

Styles and static analyzers

Run checks prior to commit

ddev composer test-style

Fix style in project with PHP CS Fixer:

ddev exec ./vendor/bin/php-cs-fixer fix

Fix style in project with PHP Code Beautifier and Fixer :

ddev exec ./vendor/bin/phpcbf

To run Php Insights with verbose output:

ddev exec ./vendor/bin/phpinsights -v

Testing

Run tests with:

ddev php artisan test

or:

ddev exec ./vendor/bin/phpunit

Local Development

https://david-test.ddev.site/coverage

Test

During tests, queues are sync since in phpunit.xml there is:

<server name="QUEUE_CONNECTION" value="sync"/>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages