Skip to content

Commit 5a2c198

Browse files
author
David GABISON
committed
fix: Windows compatibility
1 parent 70874e6 commit 5a2c198

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

composer.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@
4646
"test": "./vendor/bin/phpunit --colors --stop-on-failure",
4747
"unreleased": "./vendor/bin/since-unreleased.sh",
4848
"strauss": [
49-
"test -f ./bin/strauss.phar || curl -o bin/strauss.phar -L -C - https://github.com/BrianHenryIE/strauss/releases/download/0.14.0/strauss.phar",
50-
"vendor/stellarwp/validation/bin/set-domain domain=give",
49+
"test -f ./bin/strauss.phar || curl -o bin/strauss.phar -L -C - https://github.com/BrianHenryIE/strauss/releases/download/0.19.1/strauss.phar",
50+
"sed -i 's/PHP_EOL/\"\\n\"/' vendor/stellarwp/validation/bin/set-domain",
51+
"@php vendor/stellarwp/validation/bin/set-domain domain=give",
5152
"@php bin/strauss.phar"
5253
],
5354
"post-install-cmd": [

tests/includes/legacy/tests-give.php

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public function test_constants() {
3232

3333
// Plugin Root File
3434
$path = str_replace( 'tests/unit-tests/', '', plugin_dir_path( $filePath ) );
35+
// Windows compatibility
36+
$path = str_replace('/', DIRECTORY_SEPARATOR, $path);
3537
$this->assertSame( GIVE_PLUGIN_FILE, $path . 'give.php' );
3638
}
3739

0 commit comments

Comments
 (0)