-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
composer.json // make use of worpdress-stubs for pslam.
- Loading branch information
Showing
7 changed files
with
31 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Assets package. | ||
* | ||
* (c) Inpsyde GmbH | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
$libraryPath = dirname(__DIR__, 2); | ||
$vendorPath = "{$libraryPath}/vendor"; | ||
if (!realpath($vendorPath)) { | ||
$testsDir = str_replace('\\', '/', __DIR__); | ||
$libDir = dirname($testsDir); | ||
$vendorDir = "{$libDir}/vendor"; | ||
$autoload = "{$vendorDir}/autoload.php"; | ||
|
||
if (!is_file($autoload)) { | ||
die('Please install via Composer before running tests.'); | ||
} | ||
|
||
putenv('LIBRARY_PATH=' . $libraryPath); | ||
putenv('TESTS_DIR=' . $testsDir); | ||
putenv('LIB_DIR=' . $libDir); | ||
putenv('VENDOR_DIR=' . $vendorDir); | ||
|
||
error_reporting(E_ALL); // phpcs:ignore | ||
|
||
require_once "{$libDir}/vendor/antecedent/patchwork/Patchwork.php"; | ||
|
||
if (!defined('PHPUNIT_COMPOSER_INSTALL')) { | ||
define('PHPUNIT_COMPOSER_INSTALL', "{$vendorPath}/autoload.php"); | ||
define('PHPUNIT_COMPOSER_INSTALL', $autoload); | ||
require_once $autoload; | ||
} | ||
|
||
defined('ABSPATH') or define('ABSPATH', "{$vendorPath}/wordpress/wordpress/"); | ||
|
||
require_once "{$vendorPath}/antecedent/patchwork/Patchwork.php"; | ||
require_once "{$vendorPath}/autoload.php"; | ||
|
||
unset($libraryPath, $vendorPath); | ||
defined('ABSPATH') or define('ABSPATH', "{$vendorDir}/johnpbloch/wordpress-core/"); | ||
require_once "{$vendorDir}/johnpbloch/wordpress-core/wp-includes/class-wp-error.php"; | ||
|
||
unset($testsDir, $libDir, $vendorDir, $autoload); |