Within this folder PHPUnit tests are included. These tests are automatically ran by travis on push and pull request in various environment setups related to Hypernode. The test setup is strongly related the the one used by n98-magerun.
The local environment requires:
-
an environment variable pointing to a Magento setup or the .n98-magerun stopfile pointing to ./public (auto generated by test_setup.sh)
export N98_MAGERUN_TEST_MAGENTO_ROOT=public -
composer dev dependencies
composer install --dev -
Magento installation
magerun install --installationFolder=public --useDefaultConfigParams=yes
For convenience, the test_setup.sh script can be used to initialize this setup. It will install Magento into the public folder and setup the environment variable.
Make sure the database credentials in this script match your environment. From the project root you can run:
./build/local/symlink.sh
composer install --dev && ./build/local/test_setup.sh && vendor/bin/phpunitBy default the public directory is used for tests. To use this Magento installation for development, create symlinks to the lib/n98-magerun/modules folder.
The symlinks can be easily created by running
./build/local/symlinks.sh
This will create both the symlinks and the needed directory structure.