LoginSignup
3
0

More than 5 years have passed since last update.

ローカル(Mac)で通るテストが CI では class not found で落ちてしまう

Posted at

事象

あるコミットにおいて、

  • ローカルで phpunit を実行すると通る
  • CI での phpunit は class not found で落ちてしまう
  • これ以前のコミットでは CI での phpunit も通っていた

結論

not found だと怒られているクラス名に大文字・小文字違いのタイポが含まれていると起こる。

補足

Mac のファイルシステムは デフォルトで case-insensitive なので、大文字・小文字違いのタイポをしても気づけない。

今回は PHP で起きたが、同様のことは他の言語でも起こり得る?

事象を確認した条件

言語等

  • PHP 7.1
  • Laravel 5.4
  • PHPUnit
  • composer(PSR-4 に基づく autoload)

ローカル環境

  • MacBook Pro
  • macOS Sierra

CI

  • Circle CI
3
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0