diff --git a/packages/editor-tools/tests/TestAssetLoader.php b/packages/editor-tools/tests/TestAssetLoader.php index eb939d7..d8757af 100644 --- a/packages/editor-tools/tests/TestAssetLoader.php +++ b/packages/editor-tools/tests/TestAssetLoader.php @@ -9,7 +9,7 @@ namespace Boxuk\BoxWpEditorTools; -use Mockery; +use WP_Mock; use WP_Mock\Tools\TestCase; /** @@ -28,8 +28,33 @@ public function testLoad(): void { ->once() ->andReturn( __DIR__ . '/fixtures/AssetLoader' ); - \WP_Mock::userFunction( 'wp_enqueue_script' )->once(); - \WP_Mock::userFunction( 'wp_enqueue_style' )->once(); + \WP_Mock::userFunction( + 'wp_enqueue_script', + array( + 'times' => 1, + 'args' => array( + 'box-test', + \WP_Mock\Functions::type( 'string' ), + array(), + '1', + true, + ), + ) + ); + + \WP_Mock::userFunction( + 'wp_enqueue_style', + array( + 'times' => 1, + 'args' => array( + 'box-test', + \WP_Mock\Functions::type( 'string' ), + array(), + '1', + true, + ), + ) + ); \WP_Mock::expectFilter( 'localize_test_data_object_name', 'testData' ); \WP_Mock::onFilter( 'localize_test_data' )