2015-09-17 01:26:48 +02:00
|
|
|
<?php
|
|
|
|
if ( ! defined( 'PROJECT' ) ) {
|
2015-12-17 15:55:34 +01:00
|
|
|
define( 'PROJECT', __DIR__ . '/includes/' );
|
2015-09-17 01:26:48 +02:00
|
|
|
}
|
|
|
|
|
2015-09-17 02:17:28 +02:00
|
|
|
if ( ! defined( 'WPTHEME_DIR' ) ) {
|
2015-12-17 15:55:34 +01:00
|
|
|
define( 'WPTHEME_DIR', __DIR__ . '/' );
|
2015-09-17 01:26:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Place any additional bootstrapping requirements here for PHP Unit.
|
|
|
|
if ( ! defined( 'WP_LANG_DIR' ) ) {
|
2015-12-17 15:55:34 +01:00
|
|
|
define( 'WP_LANG_DIR', 'lang_dir' );
|
2015-09-17 01:26:48 +02:00
|
|
|
}
|
2015-09-17 02:17:28 +02:00
|
|
|
if ( ! defined( 'WPTHEME_PATH' ) ) {
|
2015-12-17 15:55:34 +01:00
|
|
|
define( 'WPTHEME_PATH', 'path' );
|
2015-09-17 01:26:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
|
2015-12-17 15:55:34 +01:00
|
|
|
throw new PHPUnit_Framework_Exception(
|
|
|
|
'ERROR' . PHP_EOL . PHP_EOL .
|
|
|
|
'You must use Composer to install the test suite\'s dependencies!' . PHP_EOL
|
|
|
|
);
|
2015-09-17 01:26:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
|
|
|
|
|
|
require_once __DIR__ . '/tests/phpunit/test-tools/TestCase.php';
|
|
|
|
|
|
|
|
WP_Mock::setUsePatchwork( true );
|
|
|
|
WP_Mock::bootstrap();
|
|
|
|
WP_Mock::tearDown();
|