Troubleshooting

First of all, you have to enter the php docker container and cd into the vulnmanager directory:

docker exec -it docker-php-1 bash
cd vulnmanager

To run a test:

bin/phpunit --configuration=phpunit-new.xml.dist tests/Backend/API/<TestDirectory>/<Test>.php

If you want the test to stop after a failure, add the flag:

--stop-on-failure

Clean Cache
...

If you get a bunch of errors on the home screen, it's probably because you didn't clean the cache:

cd vulnmanager
sudo rm -rf var/cache/dev/*
sudo rm -rf var/cache/prod/*

Refresh the Database
...

Inside the container:

php bin/console d:m:m
# doctrine migration migrate

If it returns errors:

php bin/console d:s:u --force --complete

If you get errors during tests:

composer prepare-test
# or
php bin/console d:s:u --force --complete --env=test

Use UUID instead of ID
...

For some reason, Doctrine messes up when fetching by ID, so It's always best to fetch by UUID.