Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CrochetFeve0251 committed Sep 22, 2023
1 parent 9b4976d commit 27d1795
Showing 1 changed file with 15 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
<?php

$input = file_get_contents(__DIR__ . '/HTML/input.html');
$output = file_get_contents(__DIR__ . '/HTML/output.html');
$output_added = file_get_contents(__DIR__ . '/HTML/output_added.html');
return [
'AddScript' => [
'config' => [
'html' => $input,
'script' => 'script',
'is_allowed' => true,
],
'expected' => $output_added
],
'NotAllowedShouldReturnSame' => [
'config' => [
'html' => $input,
'script' => 'script',
'is_allowed' => false,
],
'expected' => $output
],
'NoScriptShould' => [
'shouldDisplayNotice' => [
'config' => [
'html' => $input,
'script' => false,
'is_allowed' => true,
'boxes' => [],
'user_id' => 10,
'can' => true,
'transient' => true,
'notice' => true,
],
'expected' => $output
'expected' => [
'notice' => [
'status' => 'warning',
'dismissible' => '',
'dismiss_button' => 'maybe_clear_cache_change_notice',
'message' => '<strong>WP Rocket:</strong> Your Elementor template was updated. Clear the Used CSS if the layout, design or CSS styles were changed.',
'action' => 'elementor_clear_usedcss',
]
]
],

];

0 comments on commit 27d1795

Please sign in to comment.