diff --git a/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/expected-single-line.html b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/expected-single-line.html
new file mode 100644
index 0000000000..5caa1f7046
--- /dev/null
+++ b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/expected-single-line.html
@@ -0,0 +1,14 @@
+
+
+ Single line element
+
+
+
+
+
+
+
diff --git a/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/optimize.php b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/optimize.php
index 796c87a39c..c55eee95d8 100644
--- a/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/optimize.php
+++ b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/optimize.php
@@ -2,6 +2,8 @@
$hashed = file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/hashed.html' );
$expected = file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/expected.html' );
+$single_line_hashed = file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/single-line-hashed.html' );
+$single_line_expected = file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/expected-single-line.html' );
return [
'testShouldReturnEarlyWhenNoDbEntry' => [
@@ -36,4 +38,12 @@
'html' => $hashed,
'expected' => $expected,
],
+ 'testShouldReturnUpdatedHtmlForSingleLine' => [
+ 'config' => [
+ 'has_lrc' => true,
+ 'below_the_fold' => json_encode( [ '7b16eca0652d4703f83ba63e304f2030', '30c5235261141d2450dc033e5c78bbcc', 'b42afa69f728fcc707157eb61efa53cc' ] ),
+ ],
+ 'html' => $single_line_hashed,
+ 'expected' => $single_line_expected,
+ ],
];
diff --git a/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/single-line-hashed.html b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/single-line-hashed.html
new file mode 100644
index 0000000000..3e3eae2c58
--- /dev/null
+++ b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/single-line-hashed.html
@@ -0,0 +1,13 @@
+
+
+ Single line element
+
+
+
+
+
+
diff --git a/tests/Unit/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/optimize.php b/tests/Unit/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/optimize.php
index 30575b979d..17dfc5895d 100644
--- a/tests/Unit/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/optimize.php
+++ b/tests/Unit/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller/optimize.php
@@ -13,7 +13,7 @@
/**
* @group LRC
*/
-class TestOptimize extends TestCase {
+class Test_Optimize extends TestCase {
private $controller;
public function set_up() {