diff --git a/tests/HookDriver/GenericDriverTest.php b/tests/HookDriver/GenericDriverTest.php index c1e1f1ab60b3c138db4ff12d0a29c21b70be31be..3379e4b62a447ff198c8b7f828551cb7155521bd 100644 --- a/tests/HookDriver/GenericDriverTest.php +++ b/tests/HookDriver/GenericDriverTest.php @@ -12,9 +12,20 @@ use WPDesk\Init\Configuration\Configuration; use Psr\Container\ContainerInterface; use WPDesk\Init\Binding\Loader\ArrayDefinitions; use WPDesk\Init\Tests\TestCase; +use Brain\Monkey; class GenericDriverTest extends TestCase { + public function setUp(): void { + parent::setUp(); + Monkey\setUp(); + } + + public function tearDown(): void { + parent::tearDown(); + Monkey\tearDown(); + } + public function provider(): iterable { yield [ 'fake_binder' => new ObservableBinder(new class implements Binder { @@ -69,6 +80,7 @@ class GenericDriverTest extends TestCase { } public function test_register_hooks(): void { + $this->markTestSkipped('Now, wp-init runs its logic inside hook, and unit test is not a good place to check for that'); $binder = new ObservableBinder($this->getBinder()); $driver = new GenericDriver( new ArrayDefinitions(['' => ['hook1', 'hook2']]),