0 レビュー
1 回答
php-phpunitの実行でこのアサーションが失敗しないのはなぜですか?
<脇>
答えへのリンク
終了しました。この質問にはデバッグの詳細が必要です。現在、回答を受け付けていません。
わからない
0
レビュー
答え :
解決策:
これを再現することはできません:
$ cat Test.php
<?php declare(strict_types=1);
use PHPUnit\Framework\TestCase;
final class Test extends TestCase
{
public function testOne(): void
{
$this->assertTrue(1 == 2);
}
}
$ php phpunit-8.5.phar Test.php
PHPUnit 8.5.2 by Sebastian Bergmann and contributors.
F 1 / 1 (100%)
Time: 59 ms, Memory: 10.00 MB
There was 1 failure:
1) Test::testOne
Failed asserting that false is true.
/home/sb/Test.php:8
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
わからない
同様の質問
私たちのウェブサイトで同様の質問で答えを見つけてください。