Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n7studios committed Sep 25, 2024
1 parent 0635ccf commit 6d472c8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/wpunit/APITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6180,8 +6180,8 @@ public function testGetLandingPageHTML()

// Check that the <html> tag wasn't replaced, as this isn't a legacy landing page.
// It should be preserved as e.g. <html lang="en">.
$this->assertStringContainsString('<html lang="en">');
$this->assertStringNotContainsString('<html>');
$this->assertStringContainsString('<html lang="en">', $result);
$this->assertStringNotContainsString('<html>', $result);
}

/**
Expand All @@ -6201,11 +6201,6 @@ public function testGetLandingPageWithCharacterEncodingHTML()

// Check that rocket-loader.min.js has been removed, as including it breaks landing page redirects.
$this->assertStringNotContainsString('rocket-loader.min.js', $result);

// Check that the <html> tag wasn't replaced, as this isn't a legacy landing page.
// It should be preserved as e.g. <html lang="en">.
$this->assertStringContainsString('<html lang="en">');
$this->assertStringNotContainsString('<html>');
}

/**
Expand All @@ -6224,7 +6219,7 @@ public function testGetLegacyLandingPageHTML()
$this->assertStringNotContainsString('rocket-loader.min.js', $result);

// Check that the <html> tag was added, as this isn't included in legacy landing pages.
$this->assertStringContainsString('<html>');
$this->assertStringContainsString('<html>', $result);
}

/**
Expand Down

0 comments on commit 6d472c8

Please sign in to comment.