File: tests/bootstrap.php

Recommend this page to a friend!
  Classes of Jorge Castro  >  PHP Message Container  >  tests/bootstrap.php  >  Download  
File: tests/bootstrap.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Message Container
Store and retrieve messages in different lockers
Author: By
Last change:
Date: 6 months ago
Size: 835 bytes
 

Contents

Class file image Download
<?php






if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
    require_once
__DIR__ . '/../vendor/autoload.php';
} else {
    function
create_autoloader($prefix, $base_dir) {
        return function (
$class) use ($prefix, $base_dir) {
            if (
strncmp($prefix, $class, strlen($prefix)) !== 0) {
                return;
            }

           
$file = $base_dir . str_replace('\\', '/', substr($class, strlen($prefix))) . '.php';

            if (
file_exists($file)) {
                require
$file;
            }
        };
    }

   
spl_autoload_register(create_autoloader("eftec\\", __DIR__ . '/../lib/'));
   
spl_autoload_register(create_autoloader("eftec\\tests\\", __DIR__ . '/'));
}
if (
class_exists('PHPUnit_Framework_Error_Deprecated')) {
   
PHPUnit_Framework_Error_Deprecated::$enabled = false;
}




For more information send a message to info at phpclasses dot org.