도커 컨테이너에서 PHPUnit을 통해 CakePHP2 어플리케이션을 테스트 할 때 몇 가지 문제점이 있습니다.GitLab CI Docker CakePHP 2 테스트가 작동하지 않습니다.
CakePHP2 testing guide은 CakePHP2와 호환되는 마지막 PHPUnit 버전이 3.7.38입니다.
나는이 버전을 사용하고 있지만 여전히 나는 다음과 같은 오류를 얻을 :
가이 오류와 관련된 issue했지만, 그것은 phpunit을 4에서 phpunit을 3으로 다운 그레이드에 의해 해결되었다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]
여기 내 .gitlab-ci.yml의 I 인쇄의 before_script
섹션에서 GitLab 러너
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'
을 위해 사용하고 이미지의 Dockerfile입니다 PHPUnit 버전은 올바른 버전이 설치되어 있는지 확인하고 3.7.38을 인쇄합니다.
감사합니다.
나는 동일한 문제가 있지만 현재로서는 해결책이 없습니다 .--( –