PhpStorm から Codeception を走らせようとするとエラーが出る。おそらく Windows 上で、.phar
ファイルを使った場合のエラー。phar 内でのインクルードが適切に行われていない感じ。include_path
の設定をうまくやれば直りそうだけど。
Run -> Edit Configurations -> Codeption を名前を付けて追加し、その名前を実行すると以下のエラー。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
C:xamppphpphp.exe C:/Users/{User Name}/AppData/Local/Temp/ide-codeception.php run --report -o "reporters: report: PhpStorm_Codeception_ReportPrinter" --no-interaction -c d:htdocstest_phpTDDcodeception.yml PHP Warning: require_once(phar://d:htdocstest_phpTDDcodecept.phar/autoload.php): failed to open stream: phar error: "autoload.php" is not a file in phar "Z:/htdocs/test_php/TDD/codecept.phar" in C:Users{User Name}AppDataLocalTempide-codeception.php on line 21 Warning: require_once(phar://d:htdocstest_phpTDDcodecept.phar/autoload.php): failed to open stream: phar error: "autoload.php" is not a file in phar "Z:/htdocs/test_php/TDD/codecept.phar" in C:Users{User Name}AppDataLocalTempide-codeception.php on line 21 Call Stack: 0.0033 442840 1. {main}() C:Users{User Name}AppDataLocalTempide-codeception.php:0 Variables in local scope (#1): $app = *uninitialized* $exe = 'd:\htdocs\test_php\TDD\codecept.phar' $originalPath = *uninitialized* PHP Stack trace: PHP 1. {main}() C:Users{User Name}AppDataLocalTempide-codeception.php:0 PHP Fatal error: require_once(): Failed opening required 'phar://d:htdocstest_phpTDDcodecept.phar/autoload.php' (include_path='.;C:xamppphppear') in C:Users{User Name}AppDataLocalTempide-codeception.php on line 21 PHP Stack trace: PHP 1. {main}() C:Users{User Name}AppDataLocalTempide-codeception.php:0 Fatal error: require_once(): Failed opening required 'phar://d:htdocstest_phpTDDcodecept.phar/autoload.php' (include_path='.;C:xamppphppear') in C:Users{User Name}AppDataLocalTempide-codeception.php on line 21 Call Stack: 0.0033 442840 1. {main}() C:Users{User Name}AppDataLocalTempide-codeception.php:0 Variables in local scope (#1): $app = *uninitialized* $exe = 'd:\htdocs\test_php\TDD\codecept.phar' $originalPath = *uninitialized* Process finished with exit code 255 |