I excute PhPUnit, The coverage report can not generate, Laravel ver: 5.2 Php ver: 7.3.11. Log output is:
PHPUnit 4.8.36 by Sebastian Bergmann and contributors. .
Time: 1.51 seconds, Memory: 22.00MB
OK (1 test, 1 assertion)
Generating code coverage report in HTML format ...count(): Parameter must be an array or an object that implements Countable
I don't know what wrong here? Here is my test source:
<?php
use 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');
}
}