1 # Setup Test Environment
3 To test changes and contribute to Nominatim you should be able to run
4 the test suite(s). For many usecases it's enough to create a Vagrant
5 virtual machine (see `VAGRANT.md`), import one small country into the
10 Nominatim supports a range of PHP versions and PHPUnit versions also
11 move fast. We try to test against the newest stable PHP release and
12 PHPUnit version even though we expect many Nominatim users will install
13 older version on their production servers.
17 sudo apt-get install -y phpunit php-codesniffer php-cgi
18 pip3 install --user behave nose
22 pip3 install --user behave nose
24 sudo apt-get install -y composer php-cgi php-cli php-mbstring php-xml zip unzip
26 composer global require "squizlabs/php_codesniffer=*"
27 sudo ln -s ~/.config/composer/vendor/bin/phpcs /usr/bin/
29 composer global require "phpunit/phpunit=8.*"
30 sudo ln -s ~/.config/composer/vendor/bin/phpunit /usr/bin/
35 sudo dnf install -y php-dom php-mbstring
36 pip3 install --user behave nose
38 composer global require "squizlabs/php_codesniffer=*"
39 sudo ln -s ~/.config/composer/vendor/bin/phpcs /usr/bin/
41 composer global require "phpunit/phpunit=^7"
42 sudo ln -s ~/.config/composer/vendor/bin/phpunit /usr/bin/
44 ## Run tests, code linter, code coverage
46 See `README.md` in `test` subdirectory.