PHPUnit9.0 標(biāo)注-@test

2022-03-24 11:01 更新
PHPUnit9.0 標(biāo)注集合PHPUnit9.0 標(biāo)注集合

除了用 ?test ?作為測(cè)試方法名稱的前綴外,還可以在方法的文檔注釋塊中用 ?@test? 標(biāo)注來(lái)將其標(biāo)記為測(cè)試方法。

/**
 * @test
 */
public function initialBalanceShouldBe0(): void
{
    $this->assertSame(0, $this->ba->getBalance());
}


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)