<phpunit
        backupGlobals="false"
        bootstrap="bootstrap.php"
        colors="true"
        convertErrorsToExceptions="true"
        convertNoticesToExceptions="false"
        convertWarningsToExceptions="false">
    <testsuites>
        <!-- Declare a testsuite called All -->
        <testsuite name="All">
            <!-- Look for our unit tests in the following directory. They must end with Test.php -->
            <directory suffix="Test.php">.</directory>
            <directory suffix="Test.php">../src</directory>
        </testsuite>
    </testsuites>

    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">../src</directory>
            <directory suffix=".php">../library</directory>
            <file>/path/to/file</file>
        </whitelist>
    </filter>

    <listeners>
        <listener class="\Mockery\Adapter\Phpunit\TestListener"></listener>
    </listeners>
</phpunit>

<phpunit
        backupGlobals="false"
        bootstrap="bootstrap.php"
        colors="true"
        convertErrorsToExceptions="true"
        convertNoticesToExceptions="false"
        convertWarningsToExceptions="false">
    <testsuites>
        <!-- Declare a testsuite called All -->
        <testsuite name="All">
            <!-- Look for our unit tests in the following directory. They must end with Test.php -->
            <directory suffix="Test.php">.</directory>
            <directory suffix="Test.php">../src</directory>
        </testsuite>
    </testsuites>

    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">../src</directory>
            <directory suffix=".php">../library</directory>
        </whitelist>
    </filter>

    <listeners>
        <listener class="\Mockery\Adapter\Phpunit\TestListener" />
    </listeners>
</phpunit>

Add Mockery listener to PHPUnit
Add Mockery listener to PHPUnit
