PHP Classes

File: tests/bootstrap.php

Recommend this page to a friend!
  Classes of Alexandre  >  Doubles  >  tests/bootstrap.php  >  Download  
File: tests/bootstrap.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Doubles
Create mock objects by doubling a given class
Author: By
Last change:
Date: 2 years ago
Size: 612 bytes
 

Contents

Class file image Download
<?php
/**
 * This file is part of the "sitphp/doubles" package.
 *
 * @license MIT License
 * @link https://github.com/sitphp/doubles
 * @copyright Alexandre Geiswiller <alexandre.geiswiller@gmail.com>
 */

$vendor_folder = getenv('COMPOSER_VENDOR_DIR') ?: 'vendor';
$composer_autoload_path = dirname(dirname(__FILE__)) . '/' . $vendor_folder . '/' . 'autoload.php';

if (!
file_exists($composer_autoload_path)) {
    throw new
RuntimeException('Path to composer autoload file not found at :' . $composer_autoload_path);
}
require_once
$composer_autoload_path;

unset(
$vendor_folder, $composer_autoload_path);

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