-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b4976d
commit 27d1795
Showing
1 changed file
with
15 additions
and
25 deletions.
There are no files selected for viewing
40 changes: 15 additions & 25 deletions
40
tests/Fixtures/inc/ThirdParty/Plugins/PageBuilder/Elementor/maybeClearCacheChangeNotice.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
] | ||
] | ||
], | ||
|
||
]; |