PHP Classes

File: vendor/mockery/mockery/tests/Bootstrap.php

Recommend this page to a friend!
  Classes of Renato De Oliveira Lucena  >  PHP Pokemon Script  >  vendor/mockery/mockery/tests/Bootstrap.php  >  Download  
File: vendor/mockery/mockery/tests/Bootstrap.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Pokemon Script
Provides an API to manage a database of Pokemons
Author: By
Last change:
Date: 2 years ago
Size: 2,803 bytes



Class file image Download
 * Mockery
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to so we can send you a copy immediately.
 * @category Mockery
 * @package Mockery
 * @subpackage UnitTests
 * @copyright Copyright (c) 2010-2014 Pádraic Brady (
 * @license New BSD License

 * Set error reporting to the level to which Mockery code must comply.

 * Determine the root, library, and tests directories of the framework
 * distribution.
$root = realpath(dirname(dirname(__FILE__)));
$library = "$root/library";
$tests = "$root/tests";

 * Check that --dev composer installation was done
if (!file_exists($root . '/vendor/autoload.php')) {
    throw new
'Please run "php composer.phar install --dev" in root directory '
. 'to setup unit test dependencies before running the tests'

 * Prepend the Mutateme library/ and tests/ directories to the
 * include_path. This allows the tests to run out of the box and helps prevent
 * loading other copies of the code and tests that would supercede
 * this copy.
$path = array(
$library, // required for `testCallingRegisterRegistersSelfAsSplAutoloaderFunction`
set_include_path(implode(PATH_SEPARATOR, $path));


if (
version_compare(PHPUnit_Runner_Version::id(), '3.1.6', '>=')) {

     * Add Mutateme library/ directory to the PHPUnit code coverage
     * whitelist. This has the effect that only production code source files
     * appear in the code coverage report and that all production code source
     * files, even those that are not covered by a test yet, are processed.

     * Omit from code coverage reports the contents of the tests directory
foreach (array('.php', '.phtml', '.csv', '.inc') as $suffix) {
PHPUnit_Util_Filter::addDirectoryToFilter($tests, $suffix);


 * Unset global variables that are no longer needed.
unset($root, $library, $tests, $path);

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