In order to run Imagine tests, enter the root directory of Imagine (the one that contains composer.json) and execute the following command:
composer install composer testImagine uses phpunit to perform the tests.
You can pass options to phpunit by adding them after a --:
composer test -- --filter=DrawerTestplease remark that the -- have to be specified just once, even if you pass more options to phpunit:
composer test -- --filter=DrawerTest --colors=neverImagine tests may be part of one or more groups. Currently defined groups are:
always-skippedthese tests will always be marked as skippedgdtests that require the GD php extensiongmagicktests that require the Gmagick php extensionimagicktests that require the Imagick php extension
For example, you can skip the tests that will always be skipped and the tests that require Gmagick by running:
composer test -- --exclude-group=always-skipped,gmagickImagine tests often save temporary files to the tests/tmp folder. These files are deleted once test completes. In order to see what's actually gets generated by tests, you can set the IMAGINE_TEST_KEEP_TEMPFILES environment directory to a non falsy value.
For example, with POSIX systems you can run:
IMAGINE_TEST_KEEP_TEMPFILES=1 composer testor
export IMAGINE_TEST_KEEP_TEMPFILES=1 composer testWith Windows systems you can run:
set IMAGINE_TEST_KEEP_TEMPFILES=1 composer test