Skip to content

Instantly share code, notes, and snippets.

@MrRio
MrRio / README.md
Last active February 16, 2023 10:57
Speed up your phpunit code coverage output in Laravel

Speed up your phpunit code coverage output in Laravel.

Your coverage reports are slowed down by xdebug tracing within Laravel and packages you depend on, despite them not being in your final coverage report. This moves the filtering from phpunit into xdebug itself.

Before: Time: 5.33 minutes, Memory: 10.00 MB

After: Time: 1.5 minutes, Memory: 10.00 MB

./vendor/bin/phpunit --coverage-html=results/coverage

@MrRio
MrRio / TestCase.php
Created August 5, 2019 15:28
Speed up your phpunit code coverage output in Laravel.
<?php
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
@MrRio
MrRio / .travis.yml
Last active October 26, 2016 05:53
# Supercharge your Travis builds with yarn
# Commit your lock file locally, and change your travis to this
language: node_js
node_js:
- "4"
install:
- npm -g install yarn
- yarn
cache:
directories:
<?php
echo "Some code";
?>