Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauteri committed Dec 25, 2024
1 parent 4df96fa commit 9b4c071
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions test/unit/php/includes/core/classes/class-test-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ public function test_setup_hooks(): void {
'priority' => 10,
'callback' => array( $instance, 'admin_enqueue_scripts' ),
),
array(
'type' => 'action',
'name' => 'wp_enqueue_scripts',
'priority' => 10,
'callback' => array( $instance, 'frontend_enqueue_scripts' ),
),
array(
'type' => 'action',
'name' => 'enqueue_block_assets',
'priority' => 10,
'callback' => array( $instance, 'enqueue_scripts' ),
'callback' => array( $instance, 'block_enqueue_scripts' ),
),
array(
'type' => 'action',
Expand Down Expand Up @@ -128,15 +134,15 @@ public function test_event_communication_modal(): void {


/**
* Coverage for enqueue_scripts.
* Coverage for block_enqueue_scripts.
*
* @covers ::enqueue_scripts
* @covers ::block_enqueue_scripts
*
* @return void
*/
public function test_enqueue_scripts(): void {
public function test_block_enqueue_scripts(): void {
$instance = Assets::get_instance();
$instance->enqueue_scripts();
$instance->block_enqueue_scripts();

$this->assertTrue( wp_style_is( 'dashicons', 'enqueued' ) );
}
Expand Down

0 comments on commit 9b4c071

Please sign in to comment.