Skip to content

Commit 657b70d

Browse files
committed
Remove WordPress dev dependency
1 parent 0c08999 commit 657b70d

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

composer.json

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"phpstan/phpstan-mockery": "^2.0.0",
3535
"phpstan/phpstan-phpunit": "^2.0.4",
3636
"phpunit/phpunit": "^9.6.19",
37-
"roots/wordpress-no-content": "@dev",
3837
"swissspidy/phpstan-no-private": "^v1.0.0",
3938
"syde/phpcs": "^1.0.0"
4039
},

tests/boot.php

-6
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,4 @@
2222
require_once $autoload;
2323
}
2424

25-
if (!defined('ABSPATH')) {
26-
define('ABSPATH', "{$vendorDir}/roots/wordpress-no-content/");
27-
}
28-
29-
require_once "{$vendorDir}/roots/wordpress-no-content/wp-includes/class-wp-error.php";
30-
3125
unset($testsDir, $libDir, $vendorDir, $autoload);

tests/unit/PackageTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,8 @@ public function testConnectBuiltPackageFromBuildPackageFailsDebugOff(): void
11981198
$package1 = $this->stubSimplePackage('1');
11991199
$package2 = $this->stubSimplePackage('2');
12001200

1201+
\Mockery::mock('alias:' . \WP_Error::class);
1202+
12011203
Monkey\Actions\expectDone($package2->hookName(Package::ACTION_FAILED_CONNECT))
12021204
->once()
12031205
->with($package1->name(), \Mockery::type(\WP_Error::class));
@@ -1216,6 +1218,8 @@ public function testConnectBuiltPackageFromBuildPackageFailsDebugOn(): void
12161218
$package1 = $this->stubSimplePackage('1');
12171219
$package2 = $this->stubSimplePackage('2', true);
12181220

1221+
\Mockery::mock('alias:' . \WP_Error::class);
1222+
12191223
Monkey\Actions\expectDone($package2->hookName(Package::ACTION_FAILED_CONNECT))
12201224
->once()
12211225
->with($package1->name(), \Mockery::type(\WP_Error::class));
@@ -1235,6 +1239,8 @@ public function testConnectBuiltPackageFromBootedPackageFailsDebugOff(): void
12351239
$package1 = $this->stubSimplePackage('1');
12361240
$package2 = $this->stubSimplePackage('2');
12371241

1242+
\Mockery::mock('alias:' . \WP_Error::class);
1243+
12381244
Monkey\Actions\expectDone($package2->hookName(Package::ACTION_FAILED_CONNECT))
12391245
->once()
12401246
->with($package1->name(), \Mockery::type(\WP_Error::class));
@@ -1253,6 +1259,8 @@ public function testConnectBuiltPackageFromBootedPackageFailsDebugOn(): void
12531259
$package1 = $this->stubSimplePackage('1');
12541260
$package2 = $this->stubSimplePackage('2', true);
12551261

1262+
\Mockery::mock('alias:' . \WP_Error::class);
1263+
12561264
Monkey\Actions\expectDone($package2->hookName(Package::ACTION_FAILED_CONNECT))
12571265
->once()
12581266
->with($package1->name(), \Mockery::type(\WP_Error::class));

0 commit comments

Comments
 (0)