forked from Bynder/gathercontent-wordpress-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php.dist
More file actions
31 lines (25 loc) · 820 Bytes
/
bootstrap.php.dist
File metadata and controls
31 lines (25 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
if ( ! defined( 'PROJECT' ) ) {
define( 'PROJECT', __DIR__ . '/includes/' );
}
if ( ! defined( 'GATHERCONTENT_DIR' ) ) {
define( 'GATHERCONTENT_DIR', __DIR__ . '/' );
}
// Place any additional bootstrapping requirements here for PHP Unit.
if ( ! defined( 'WP_LANG_DIR' ) ) {
define( 'WP_LANG_DIR', 'lang_dir' );
}
if ( ! defined( 'GATHERCONTENT_PATH' ) ) {
define( 'GATHERCONTENT_PATH', 'path' );
}
if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
throw new PHPUnit_Framework_Exception(
'ERROR' . PHP_EOL . PHP_EOL .
'You must use Composer to install the test suite\'s dependencies!' . PHP_EOL
);
}
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();