ドッカーのコンテナで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を出力します。
私はこれに関する助けに感謝します!
私は同じ問題を抱えていますが、現時点では解決策はありません:-( –