We always appreciate contributions to PHP ActiveRecord, but we are not always able to respond as quickly as we would like. Please do not take delays personal and feel free to remind us by commenting on issues.
PHP ActiveRecord has a full set of unit tests, which are run by PHPUnit.
In order to run these unit tests, you need to install the required packages using Composer:
composer installAfter that you can run the tests by invoking the local PHPUnit
To run all test simply use:
vendor/bin/phpunitOr run a single test file by specifying its path:
vendor/bin/phpunit test/InflectorTest.phpYou might notice that some tests are marked as skipped. To obtain more information about skipped
tests, pass the --verbose flag to PHPUnit:
vendor/bin/phpunit --verboseSome common steps for fixing skipped tests are to:
- Install
memcachedand the PHP memcached extension (e.g.,brew install php56-memcache memcachedon macOS) - Install the PDO drivers for PostgreSQL (e.g.,
brew install php56-pdo-pgsqlon macOS) - Create a MySQL database and a PostgreSQL database. You can either create these such that they are available at the default locations of
mysql://test:test@127.0.0.1/testandpgsql://test:test@127.0.0.1/testrespectively. Alternatively, you can set thePHPAR_MYSQLandPHPAR_PGSQLenvironment variables to specify a different location for the MySQL and PostgreSQL databases.