README.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. To get the Airtime unit tests running:
  2. ==========================
  3. 1) Install PHPUnit
  4. We explicitly install PHPUnit 3.4 because that the most recent version
  5. that's still supported by Zend Framework 1:
  6. sudo pear channel-discover pear.phpunit.de
  7. sudo pear channel-discover pear.symfony.com
  8. sudo pear channel-discover pear.symfony-project.com
  9. sudo pear install channel://pear.symfony-project.com/YAML
  10. sudo pear install pear.phpunit.de/PHPUnit-3.4.10
  11. DO NOT INSTALL the DbUnit package!
  12. DbUnit overwrites a file that's actually part of the PHPUnit package,
  13. /usr/share/php/PHPUnit/Extensions/Database/DataSet/QueryTable.php
  14. with a version that's incompatible and gives an error for us.
  15. 2) Running the unit tests:
  16. 1. To run all the unit tests, run:
  17. $ sudo ./runtests.sh
  18. (It has to be run as root to access the database for now.)
  19. 2. To run one specific test, you can do something like:
  20. $ export AIRTIME_UNIT_TEST="1"
  21. $ sudo -E phpunit --filter testEditReatingShowInstance application/services/database/ShowServiceDbTest.php
  22. IMPORTANT: Make sure you use "sudo" with the "-E" flag so it preserves the environment variable we set before that.