public static function findConfigFile($buildPath)
    {
        if (file_exists($buildPath . 'phpunit.xml')) {
            return 'phpunit.xml';
        }

        if (file_exists($buildPath . 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml')) {
            return 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml';
        }

        if (file_exists($buildPath . 'phpunit.xml.dist')) {
            return 'phpunit.xml.dist';
        }

        if (file_exists($buildPath . 'tests/phpunit.xml.dist')) {
            return 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml.dist';
        }

        return null;
    }
public static function findConfigFile($buildPath)
    {
        if (file_exists($buildPath . 'phpunit.xml')) {
            return 'phpunit.xml';
        }

        if (file_exists($buildPath . 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml')) {
            return 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml';
        }

        if (file_exists($buildPath . 'phpunit.xml.dist')) {
            return 'phpunit.xml.dist';
        }

        if (file_exists($buildPath . 'tests/phpunit.xml.dist')) {
            return 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml.dist';
        }

        return null;
    }
public static function findConfigFile ( $ buildPath ) { if ( file_exists ( $ buildPath . 'phpunit.xml' ) ) { return 'phpunit.xml' ; } if ( file_exists ( $ buildPath . 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml' ) ) { return 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml' ; } if ( file_exists ( $ buildPath . 'phpunit.xml.dist' ) ) { return 'phpunit.xml.dist' ; } if ( file_exists ( $ buildPath . 'tests/phpunit.xml.dist' ) ) { return 'tests' . DIRECTORY_SEPARATOR . 'phpunit.xml.dist' ; } return null ; }
Try and find the phpunit XML config file.
@param $buildPath
@return null|string
Try and find the phpunit XML config file .