Skip to content

Commit

Permalink
fix other thirdparty tests
Browse files Browse the repository at this point in the history
  • Loading branch information
engahmeds3ed committed Jul 18, 2023
1 parent fed1014 commit 6394832
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ class Test_ExcludePDFEmbedderScripts extends TestCase {
public function testShouldExcludePDFEmbedderScripts() {
$excluded_js = apply_filters( 'rocket_exclude_js', [] );

$this->assertSame( [ '/wp-content/plugins/pdf-embedder/js/(.*).js' ], $excluded_js );
$this->assertContains( '/wp-content/plugins/pdf-embedder/js/(.*).js', $excluded_js );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class Test_ExcludePDFEmbedderScriptsPremium extends TestCase {

public function testShouldExcludePDFEmbedderScripts() {
$excluded_js = apply_filters( 'rocket_exclude_js', [] );
$expected = [
'/wp-content/plugins/PDFEmbedder-premium/js/pdfjs/(.*).js',
'/wp-content/plugins/PDFEmbedder-premium/js/(.*).js',
];

$this->assertSame(
[
'/wp-content/plugins/PDFEmbedder-premium/js/pdfjs/(.*).js',
'/wp-content/plugins/PDFEmbedder-premium/js/(.*).js',
],
$excluded_js
);
foreach ( $expected as $item ) {
$this->assertContains( $item, $excluded_js );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ class Test_ExcludePDFEmbedderScriptsSecure extends TestCase {
public function testShouldExcludePDFEmbedderScripts() {
$excluded_js = apply_filters( 'rocket_exclude_js', [] );

$this->assertSame(
[
'/wp-content/plugins/PDFEmbedder-premium-secure/js/pdfjs/(.*).js',
'/wp-content/plugins/PDFEmbedder-premium-secure/js/(.*).js',
],
$excluded_js
);
$expected = [
'/wp-content/plugins/PDFEmbedder-premium-secure/js/pdfjs/(.*).js',
'/wp-content/plugins/PDFEmbedder-premium-secure/js/(.*).js',
];

foreach ( $expected as $item ) {
$this->assertContains( $item, $excluded_js );
}
}
}

0 comments on commit 6394832

Please sign in to comment.