PHP Classes

File: Library/vendor/vlucas/valitron/tests/bootstrap.php

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/vlucas/valitron/tests/bootstrap.php   Download  
File: Library/vendor/vlucas/valitron/tests/bootstrap.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 676 bytes
 

Contents

Class file image Download
<?php

error_reporting
(-1);
date_default_timezone_set('UTC');

/**
 * Path trickery ensures test suite will always run, standalone or within
 * another composer package. Designed to find composer autoloader and require
 */
$vendorPos = strpos(__DIR__, 'vendor/vlucas/valitron');
if (
$vendorPos !== false)
{
   
// Package has been cloned within another composer package, resolve path to autoloader
   
$vendorDir = substr(__DIR__, 0, $vendorPos) . 'vendor/';
   
$loader = require $vendorDir . 'autoload.php';
} else
{
   
// Package itself (cloned standalone)
   
$loader = require __DIR__ . '/../vendor/autoload.php';
}

require_once
__DIR__ . '/Valitron/BaseTestCase.php';