tester; $I->amOnPage('/phpunit/result-test-student/'); $responseContent = $I->grabPageSource(); $row = $this->tester->grabFromDatabase('php_testing_rule', 'testing_rule', [ 'testing_name' => 'testing_number_one' ]); $test = str_replace(["\r\n", "\r", "\n", " "], "", $row); $result_test = htmlspecialchars($test); // hasilnya: <?phpecho1;?> $result_content = str_replace(["\r\n", "\r", "\n", " "], "", $responseContent); // TANPA htmlentities $this->assertStringContainsString( $result_test, $result_content, "❌ ERROR: String $result_test tidak ditemukan di halaman!" ); } }