@@ -596,10 +596,10 @@ public function testSendRemovesDefaultNoncePlaceholdersWhenCSPDisabled(): void
596596 ob_end_clean ();
597597
598598 // Nonce placeholders should be removed when CSP is disabled
599- $ this ->assertStringNotContainsString ('{csp-script-nonce} ' , $ actual );
600- $ this ->assertStringNotContainsString ('{csp-style-nonce} ' , $ actual );
601- $ this ->assertStringContainsString ('<script >console.log("test")</script> ' , $ actual );
602- $ this ->assertStringContainsString ('<style >.test{}</style> ' , $ actual );
599+ $ this ->assertStringNotContainsString ('{csp-script-nonce} ' , ( string ) $ actual );
600+ $ this ->assertStringNotContainsString ('{csp-style-nonce} ' , ( string ) $ actual );
601+ $ this ->assertStringContainsString ('<script >console.log("test")</script> ' , ( string ) $ actual );
602+ $ this ->assertStringContainsString ('<style >.test{}</style> ' , ( string ) $ actual );
603603 }
604604
605605 public function testSendRemovesCustomNoncePlaceholdersWhenCSPDisabled (): void
@@ -629,10 +629,10 @@ public function testSendRemovesCustomNoncePlaceholdersWhenCSPDisabled(): void
629629 ob_end_clean ();
630630
631631 // Custom nonce placeholders should be removed when CSP is disabled
632- $ this ->assertStringNotContainsString ('{custom-script-tag} ' , $ actual );
633- $ this ->assertStringNotContainsString ('{custom-style-tag} ' , $ actual );
634- $ this ->assertStringContainsString ('<script >test()</script> ' , $ actual );
635- $ this ->assertStringContainsString ('<style >.x{}</style> ' , $ actual );
632+ $ this ->assertStringNotContainsString ('{custom-script-tag} ' , ( string ) $ actual );
633+ $ this ->assertStringNotContainsString ('{custom-style-tag} ' , ( string ) $ actual );
634+ $ this ->assertStringContainsString ('<script >test()</script> ' , ( string ) $ actual );
635+ $ this ->assertStringContainsString ('<style >.x{}</style> ' , ( string ) $ actual );
636636 }
637637
638638 public function testSendWithCSPDisabledDoesNotAffectBodyWithoutNonceTags (): void
0 commit comments