Skip to content

Instantly share code, notes, and snippets.

@jk
Created May 15, 2014 15:22
Show Gist options
  • Select an option

  • Save jk/91b49264f1b471fa699b to your computer and use it in GitHub Desktop.

Select an option

Save jk/91b49264f1b471fa699b to your computer and use it in GitHub Desktop.
Patch some configuration capabilities into PHPUnit
<?php
$prefixPath = 'tests';
/*
* Load the user-defined test configuration file, if it exists; otherwise, load
* the default configuration.
*/
if (is_readable($prefixPath . DIRECTORY_SEPARATOR . 'TestConfiguration.php')) {
require_once $prefixPath . DIRECTORY_SEPARATOR . 'TestConfiguration.php';
} else {
require_once $prefixPath . DIRECTORY_SEPARATOR . 'TestConfiguration.php.dist';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment