There are sometimes error messages when running unit tests in the dev environment which were observed when reviewing PR #1987.
To reproduce the problem:
Run ./up.sh to start dev GigaDB instance.
Run RelationDAOTest unit test:
docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest
1) RelationDAOTest: Itshould add reciprocal relation | #0
Test tests/unit/RelationDAOTest.php:testItshouldAddReciprocalRelation
[PHPUnit_Framework_Exception] Trying to get property 'id' of non-object
However, running all unit tests by executing `docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit` will allow `RelationDAOTest` to pass. If you then run `docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest` then this will pass too.
Feels like running `docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit` makes `docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest` use test data in `protected/tests/fixtures`. If you execute `docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest` immediately after `./up.sh` then dev data is used in unit tests which may be related to why it was sometimes failing for me.
There are sometimes error messages when running unit tests in the dev environment which were observed when reviewing PR #1987.
To reproduce the problem:
./up.sh
to start dev GigaDB instance.Run RelationDAOTest unit test:
1 /var/www/protected/models/RelationDAO.php:64
2 /var/www/tests/unit/RelationDAOTest.php:65
3 RelationDAOTest->testItshouldAddReciprocalRelation