6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PHPUnitでmarkTestIncompleteでテストの未実装を明示する

Last updated at Posted at 2020-04-13

PHPUnitでテストを実装するときにテストを実装しなきゃいけないことがわかっているが、今は事情により実装出来ない場合


public function testHoge()
{
    $this->markTestIncomplete('後で実装する');
}

というふうにmarkTestIncompleteを利用してmarkしておくとテスト実行時にTrueでもFalseでもなく、IncompleteのIが表示されるようになります。

これによってテストの未実装を防ぐことが出来ます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?