@@ -391,7 +391,7 @@ public function testTurnstileIsOffWithEmptyKeys(): void
391391 );
392392
393393 $ this ->assertSame ('' , $ service ->turnstileSiteKey ());
394- $ this ->assertTrue ($ service ->verifyTurnstile ('' , null ));
394+ $ this ->assertTrue ($ service ->verifyTurnstile ('' , '' ));
395395 $ this ->assertSame ([], $ calls );
396396 }
397397
@@ -405,14 +405,14 @@ public function testTurnstileIsOffWithoutASecretKey(): void
405405 );
406406
407407 $ this ->assertSame ('' , $ service ->turnstileSiteKey ());
408- $ this ->assertTrue ($ service ->verifyTurnstile ('' , null ));
408+ $ this ->assertTrue ($ service ->verifyTurnstile ('' , '' ));
409409 $ this ->assertSame ([], $ calls );
410410 }
411411
412412 public function testTurnstileIsOffByDefault (): void
413413 {
414414 $ this ->assertSame ('' , $ this ->service ()->turnstileSiteKey ());
415- $ this ->assertTrue ($ this ->service ()->verifyTurnstile ('' , null ));
415+ $ this ->assertTrue ($ this ->service ()->verifyTurnstile ('' , '' ));
416416 }
417417
418418 public function testTurnstileSiteKeyIsExposedWhenBothKeysAreSet (): void
@@ -449,7 +449,7 @@ public function testRemoteIpIsOmittedWhenNull(): void
449449 $ calls = [];
450450 $ service = $ this ->turnstileService (self ::TURNSTILE , self ::SITEVERIFY_SUCCESS , $ calls );
451451
452- $ this ->assertTrue ($ service ->verifyTurnstile ('token ' , null ));
452+ $ this ->assertTrue ($ service ->verifyTurnstile ('token ' , '' ));
453453 $ this ->assertSame ([['secret ' => 'secret-key ' , 'response ' => 'token ' ]], $ calls );
454454 }
455455
@@ -476,7 +476,7 @@ public static function rejectedSiteverifyProvider(): array
476476 #[DataProvider('rejectedSiteverifyProvider ' )]
477477 public function testRejectedSiteverifyFails (array $ turnstile , ?string $ response ): void
478478 {
479- $ this ->assertFalse ($ this ->turnstileService ($ turnstile , $ response )->verifyTurnstile ('token ' , null ));
479+ $ this ->assertFalse ($ this ->turnstileService ($ turnstile , $ response )->verifyTurnstile ('token ' , '' ));
480480 }
481481
482482 public function testMatchingHostnamePasses (): void
@@ -486,7 +486,7 @@ public function testMatchingHostnamePasses(): void
486486 self ::SITEVERIFY_SUCCESS
487487 );
488488
489- $ this ->assertTrue ($ service ->verifyTurnstile ('token ' , null ));
489+ $ this ->assertTrue ($ service ->verifyTurnstile ('token ' , '' ));
490490 }
491491
492492 public function testTestingKeyResponsePassesEvenWithAHostnameConfigured (): void
@@ -496,6 +496,6 @@ public function testTestingKeyResponsePassesEvenWithAHostnameConfigured(): void
496496 '{"success":true,"hostname":"example.com","metadata":{"result_with_testing_key":true}} '
497497 );
498498
499- $ this ->assertTrue ($ service ->verifyTurnstile ('token ' , null ));
499+ $ this ->assertTrue ($ service ->verifyTurnstile ('token ' , '' ));
500500 }
501501}
0 commit comments