PHP Classes

File: src/vendor/phpunit/phpunit/src/Util/PHP/Template/PhptTestCase.tpl

Recommend this page to a friend!
  Classes of walid laggoune   QPHP   src/vendor/phpunit/phpunit/src/Util/PHP/Template/PhptTestCase.tpl   Download  
File: src/vendor/phpunit/phpunit/src/Util/PHP/Template/PhptTestCase.tpl
Role: Example script
Content type: text/plain
Description: Example script
Class: QPHP
Exchange messages with a queue server using Swoole
Author: By
Last change:
Date: 2 years ago
Size: 1,208 bytes
 

Contents

Class file image Download
<?php
use SebastianBergmann\CodeCoverage\CodeCoverage;
use
SebastianBergmann\CodeCoverage\Driver\Selector;
use
SebastianBergmann\CodeCoverage\Filter;

$composerAutoload = {composerAutoload};
$phar = {phar};

ob_start();

$GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'][] = '{job}';

if (
$composerAutoload) {
    require_once
$composerAutoload;

   
define('PHPUNIT_COMPOSER_INSTALL', $composerAutoload);
} else if (
$phar) {
    require
$phar;
}

{
globals}
$coverage = null;

if (isset(
$GLOBALS['__PHPUNIT_BOOTSTRAP'])) {
    require_once
$GLOBALS['__PHPUNIT_BOOTSTRAP'];
}

if (
class_exists('SebastianBergmann\CodeCoverage\CodeCoverage')) {
   
$filter = new Filter;

   
$coverage = new CodeCoverage(
        (new
Selector)->{driverMethod}($filter),
       
$filter
   
);

    if ({
codeCoverageCacheDirectory}) {
       
$coverage->cacheStaticAnalysis({codeCoverageCacheDirectory});
    }

   
$coverage->start(__FILE__);
}

register_shutdown_function(
    function() use (
$coverage) {
       
$output = null;

        if (
$coverage) {
           
$output = $coverage->stop();
        }

       
file_put_contents('{coverageFile}', serialize($output));
    }
);

ob_end_clean();

require
'{job}';