From 8582c936a65b6182fa00f7b471636ed3c4d08378 Mon Sep 17 00:00:00 2001 From: James Amner Date: Wed, 22 May 2024 14:48:46 +0100 Subject: [PATCH] WIP --- .../editor-tools/tests/TestAssetLoader.php | 35 ++++--------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/packages/editor-tools/tests/TestAssetLoader.php b/packages/editor-tools/tests/TestAssetLoader.php index d8757af..7c4715f 100644 --- a/packages/editor-tools/tests/TestAssetLoader.php +++ b/packages/editor-tools/tests/TestAssetLoader.php @@ -9,7 +9,6 @@ namespace Boxuk\BoxWpEditorTools; -use WP_Mock; use WP_Mock\Tools\TestCase; /** @@ -28,33 +27,13 @@ public function testLoad(): void { ->once() ->andReturn( __DIR__ . '/fixtures/AssetLoader' ); - \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::userFunction( 'wp_enqueue_script' ) + ->once() + ->with( 'box-test', \WP_Mock\Functions::type( 'string' ), array(), '1', true ); + + \WP_Mock::userFunction( 'wp_enqueue_style' ) + ->once() + ->with( 'box-test', \WP_Mock\Functions::type( 'string' ), array(), '1' ); \WP_Mock::expectFilter( 'localize_test_data_object_name', 'testData' ); \WP_Mock::onFilter( 'localize_test_data' )