Visualphpunit\Core\Parser::addBootstrap PHP Method

addBootstrap() private method

Require bootstrap if vpu can find it
private addBootstrap ( array $tests ) : void
$tests array
return void
    private function addBootstrap($tests)
    {
        foreach ($tests as $filename) {
            if (file_exists($filename)) {
                $case1 = strpos($filename, 'tests');
                $case2 = strpos($filename, 'Tests');
                if (is_numeric($case1)) {
                    $path = substr($filename, 0, $case1 + 6) . 'bootstrap.php';
                    if (file_exists($path)) {
                        require_once $path;
                    }
                }
                if (is_numeric($case2)) {
                    $path = substr($filename, 0, $case2 + 6) . 'bootstrap.php';
                    if (file_exists($path)) {
                        require_once $path;
                    }
                }
            }
        }
    }