Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jdamner committed May 22, 2024
1 parent ae360d2 commit 43ce85d
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions packages/editor-tools/tests/TestAssetLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Boxuk\BoxWpEditorTools;

use Mockery;
use WP_Mock;
use WP_Mock\Tools\TestCase;

/**
Expand All @@ -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' )
Expand Down

0 comments on commit 43ce85d

Please sign in to comment.