我執(zhí)行PhPUnit,覆蓋率報(bào)告無(wú)法生成,Laravel版本:5.2 Php版本:7.3.11。日志輸出為:PHPUnit 4.8.36 由 Sebastian Bergmann 和貢獻(xiàn)者提供。.使用時(shí)間: 1.51 秒, 內(nèi)存: 22.00MB正常(1 個(gè)測(cè)試,1 個(gè)斷言)正在生成 HTML 格式的代碼覆蓋率報(bào)告...count():參數(shù)必須是實(shí)現(xiàn) Countable 的數(shù)組或?qū)ο笪也恢肋@里怎么了?這是我的測(cè)試源:<?phpuse Illuminate\Foundation\Testing\WithoutMiddleware;use Illuminate\Foundation\Testing\DatabaseMigrations;use Illuminate\Foundation\Testing\DatabaseTransactions;use Illuminate\Http\Response;class TravelControllerTest extends TestCase{ /** * A basic functional test example. * * @return void */ public function testBasicExample() { $response = $this->json('GET', '/v1/abc', ['id' => 'Sally']); $response->assertSessionHas('temporary_id', $value = 'Sally'); }}
覆蓋 phpunit on Laravel 5.2
動(dòng)漫人物
2022-08-05 09:56:58