I have some problems with testing CakePHP2 applications via PHPUnit in a docker container.
The CakePHP2 testing guide states, that the last PHPUnit version that's compatible with CakePHP2 is 3.7.38.
I'm using this version but still I get the following errors:
Warning Error: include(PHPUnit/Autoload.php): failed to open stream: No such file or directory in [/builds/application_folder/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php, line 162]
Warning Error: include(): Failed opening 'PHPUnit/Autoload.php' for inclusion (include_path='/builds/zb2/kswf/lib:.:/usr/local/lib/php') in [/builds/application_folder/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php, line 162]
There was an issue related to this error, but it was solved by downgrading from PHPUnit 4 to PHPUnit 3.
Here is the Dockerfile for the image that I'm using for the GitLab Runner
FROM php:5
RUN apt-get update -y
RUN apt-get install -y wget
RUN sh -c 'wget -c https://phar.phpunit.de/phpunit-3.7.38.phar -O phpunit.phar && chmod +x phpunit.phar && mv phpunit.phar /usr/local/bin/phpunit'
In the before_script
section of my .gitlab-ci.yml I print the PHPUnit version to verify that the correct version is installed and it prints 3.7.38.
I'd appreciate any help on this!