Phpunit代码覆盖率未捕获我的代码

Phpunit代码覆盖率未捕获我的代码,phpunit,php-code-coverage,Phpunit,Php Code Coverage,我正在尝试使用codeception和guzzle对用php编写的API进行phpunit测试,所有测试都在运行,但codecoverage始终显示为0/0。 我在下面分享我的测试功能 public function testInputget() { $c = $this->id; // create our http client (Guzzle) $client = new Client(); $url = 'http://localhost/unit_test/testApi/u

我正在尝试使用codeception和guzzle对用php编写的API进行phpunit测试,所有测试都在运行,但codecoverage始终显示为0/0。 我在下面分享我的测试功能

public function testInputget()
{
 $c = $this->id;
 // create our http client (Guzzle)
$client = new Client();
$url = 'http://localhost/unit_test/testApi/user';
if($c != '')
{
    $url .='/'.$c; 
}
// echo $url;
try
{

    // $response = $client->request('GET', 'http://localhost/unit_test/testApi/user');
    $response = $client->request('GET', $url);
    // var_dump(expression)
    $this->assertEquals(200, $response->getStatusCode());
    $this->assertEquals('success', json_decode($response->getBody()->getContents())->status);  
    // $this->assertInternalType('array', json_decode($response->getBody()->getContents())->users);   
    // print_r(json_decode($response->getBody())->users);  
    $this->assertEquals($this->username, json_decode($response->getBody())->users[0]->username);
    $this->assertEquals($this->age, json_decode($response->getBody())->users[0]->age);        
    $this->assertEquals($this->status, json_decode($response->getBody())->users[0]->status);        
    // var_dump(json_decode($response->getBody())->users);  


}
catch (RequestException $z) 
{

    // Catch all 4XX errors 

    // To catch exactly error 400 use 
    if($z->getResponse()->getStatusCode() != '200') 
    {
        // print_r($z->getResponse()->getBody()->getContents());
        // echo json_decode($z->getResponse()->getBody()->getContents())->remark;
        // $this->assertEquals($a, $z->getResponse()->getStatusCode());
        // $this->assertEquals($b, json_decode($z->getResponse()->getBody()->getContents())->status);
        // $this->assertContains('utsab', json_decode($response->getBody()->getContents())->users);        
    }

}     
}
我使用的命令是

./vendor/bin/codecept运行--覆盖--覆盖html