sintonia/airtime_mvc/tests
drigato a59453cde5 CC-5651: Unit Test the Scheduler 2014-01-27 17:17:03 -05:00
..
application CC-5651: Unit Test the Scheduler 2014-01-27 17:17:03 -05:00
library CC-5651: Unit Test the Schedule 2014-01-13 11:43:16 -05:00
README.txt CC-5651: Unit Test the Scheduler 2014-01-23 17:04:29 -05:00
TODO.txt CC-5651: Unit Test the Scheduler 2014-01-23 17:04:29 -05:00
airtime.conf CC-5651: Unit Test the Scheduler 2014-01-23 17:04:29 -05:00
phpunit.xml Disable code coverage report because autoloader is not working 2014-01-22 17:00:23 -05:00
runtests.sh CC-5651: Unit Test the Scheduler 2014-01-13 11:43:17 -05:00

README.txt

To get the Airtime unit tests running:
==========================

1) Install PHPUnit 

We explicitly install PHPUnit 3.4 because that's as a new of a version
as is supported by Zend Framework 1:

sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony.com
sudo pear channel-discover pear.symfony-project.com
sudo pear install channel://pear.symfony-project.com/YAML
sudo pear install pear.phpunit.de/PHPUnit-3.4.10


DO NOT INSTALL the DbUnit package!
DbUnit overwrites a file that's actually part of the PHPUnit package,
    /usr/share/php/PHPUnit/Extensions/Database/DataSet/QueryTable.php
with a version that's incompatible and gives an error for us.


2) Running the unit tests:

    1. To run all the unit tests, run:

        $ sudo ./runtests.sh

    (It has to be run as root to access the database for now.)

    2. To run one specific test, you can do something like:

        $ export AIRTIME_UNIT_TEST="1"
        $ sudo -E phpunit --filter testEditReatingShowInstance application/services/database/ShowServiceDbTest.php

    IMPORTANT: Make sure you use "sudo" with the "-E" flag so it preserves the environment variable we set before that.



FAQ
====
- If you get errors about an AMPQ fwrite failing, it means your RabbitMQ credentials are wrong in airtime.conf.
  (That's the airtime.conf in this directory.)