How to conditionaly only allow a test to run if using coverage (laravel phpunit)

Viewed 11

I have a test in my tests folder which i want to skip while testing but run when checking for coverage. Is this possible? I notice looking at other tests generated by laravel jetstrem that I can conditionally ignore a test if a feature is disabled:

if (! Features::hasApiFeatures()) {
    return $this->markTestSkipped('API support is not enabled.');
}

I have not found any way I can check if coverage is being used or not.

0 Answers
Related