Here we are with David Test
📋 To-Do — Gestione Prodotti e Categorie
- Creazione Modello Product con campi
price,colorecategory_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
colorecategory(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)
ddev startddev composer installThe project uses two database:
- For
localenvironment:db - For
testingenvironment: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 migrateddev php artisan db:seedTo set up a fresh version of database and run seeders at the same time:
ddev php artisan migrate:fresh --seedRun checks prior to commit
ddev composer test-styleFix style in project with PHP CS Fixer:
ddev exec ./vendor/bin/php-cs-fixer fixFix style in project with PHP Code Beautifier and Fixer :
ddev exec ./vendor/bin/phpcbfTo run Php Insights with verbose output:
ddev exec ./vendor/bin/phpinsights -vRun tests with:
ddev php artisan testor:
ddev exec ./vendor/bin/phpunithttps://david-test.ddev.site/coverage
During tests, queues are sync since in phpunit.xml there is:
<server name="QUEUE_CONNECTION" value="sync"/>