LoginSignup
0
0

More than 5 years have passed since last update.

PHPUnit実行中に例外発生「Execution aborted after 1 second」

Posted at

PHPUnitに次の例外が発生したときの対応。

Execution aborted after 1 second

これはstrictをtrueにしている場合に発生する例外。
テストの処理時間が1秒超えてテスト失敗と判断されている。

phpunit.xml
<phpunit strict="true">
(省略)

テストに1秒以上かかるなら、テストメソッドに@mediumを付けると失敗判定を10秒にできる。
@largeを付けると60秒。

sample.php
/**
* @medium
*/
public function test_sample() {

詳細はPHPUnitアノテーションに記載されています。

0
0
0

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
0
0