Skip to content

Commit 1293d22

Browse files
committed
Bootstrap added
1 parent a0ad141 commit 1293d22

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

tests/bootstrap.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
/**
3+
* PHPUnit/Pest bootstrap.
4+
*
5+
* MslsMenu.php guards against direct access via ABSPATH, so the constant has to
6+
* exist before the plugin file is loaded. Loading it here instead of through
7+
* autoload-dev keeps it out of the phpcs and phpstan processes, which analyse
8+
* the file rather than execute it.
9+
*
10+
* @package mslsmenu
11+
*/
12+
13+
declare( strict_types=1 );
14+
15+
if ( ! defined( 'ABSPATH' ) ) {
16+
define( 'ABSPATH', __DIR__ . '/' );
17+
}
18+
19+
require_once __DIR__ . '/../vendor/autoload.php';
20+
require_once __DIR__ . '/../MslsMenu.php';

0 commit comments

Comments
 (0)