23 lines
844 B
PHP
23 lines
844 B
PHP
<?php
|
|
/*
|
|
* PHPUnit bootstrap: load the site libraries once, with a fake database
|
|
* and a test configuration. PhpProcess runs it again in each subprocess.
|
|
*/
|
|
require_once __DIR__ . '/environment.php';
|
|
|
|
// publish/post.lib.php and the files it includes use paths relative to
|
|
// publish/. Each unit test runs there too (see TestCase), but PHPUnit
|
|
// needs the first directory back to find the test files named on the
|
|
// command line.
|
|
$cwd = getcwd();
|
|
chdir(XXX_ROOT . '/publish');
|
|
require_once XXX_ROOT . '/config.lib.php';
|
|
require_once XXX_ROOT . '/session.lib.php';
|
|
require_once XXX_ROOT . '/get_data.lib.php';
|
|
require_once XXX_ROOT . '/navigation.lib.php';
|
|
require_once XXX_ROOT . '/publish/post.lib.php';
|
|
require_once XXX_ROOT . '/lib/convert_entities.inc.php';
|
|
require_once XXX_ROOT . '/lib/smartypants.inc.php';
|
|
chdir($cwd);
|
|
unset($cwd);
|