diff --git a/tests/system/Commands/ClearDebugbarTest.php b/tests/system/Commands/ClearDebugbarTest.php index b8f6fa13e535..f3062d9d5ac7 100644 --- a/tests/system/Commands/ClearDebugbarTest.php +++ b/tests/system/Commands/ClearDebugbarTest.php @@ -39,7 +39,7 @@ protected function createDummyDebugbarJson(): void // create 10 dummy debugbar json files for ($i = 0; $i < 10; $i++) { - $path = str_replace($time, $time - $i, $path); + $path = str_replace((string) $time, (string) ($time - $i), $path); file_put_contents($path, "{}\n"); $time -= $i; diff --git a/tests/system/CommonFunctionsSendTest.php b/tests/system/CommonFunctionsSendTest.php index a580366277fb..4e88dd96644c 100644 --- a/tests/system/CommonFunctionsSendTest.php +++ b/tests/system/CommonFunctionsSendTest.php @@ -43,7 +43,7 @@ public function testRedirectResponseCookiesSent(): void $response = redirect()->route('login') ->setCookie('foo', 'onething', YEAR) - ->setCookie('login_time', $loginTime, YEAR); + ->setCookie('login_time', (string) $loginTime, YEAR); $response->pretend(false); $this->assertTrue($response->hasCookie('foo', 'onething')); $this->assertTrue($response->hasCookie('login_time')); diff --git a/tests/system/CommonFunctionsTest.php b/tests/system/CommonFunctionsTest.php index b6702c5a7376..15c52896a17b 100644 --- a/tests/system/CommonFunctionsTest.php +++ b/tests/system/CommonFunctionsTest.php @@ -576,7 +576,7 @@ public function testRedirectResponseCookies1(): void $answer1 = redirect()->route('login') ->setCookie('foo', 'onething', YEAR) - ->setCookie('login_time', $loginTime, YEAR); + ->setCookie('login_time', (string) $loginTime, YEAR); $this->assertTrue($answer1->hasCookie('foo', 'onething')); $this->assertTrue($answer1->hasCookie('login_time')); diff --git a/tests/system/Debug/Toolbar/Collectors/HistoryTest.php b/tests/system/Debug/Toolbar/Collectors/HistoryTest.php index 1286a489b14f..8e056fbc755c 100644 --- a/tests/system/Debug/Toolbar/Collectors/HistoryTest.php +++ b/tests/system/Debug/Toolbar/Collectors/HistoryTest.php @@ -61,7 +61,7 @@ private function createDummyDebugbarJson(): void // create 20 dummy debugbar json files for ($i = 0; $i < 20; $i++) { - $path = str_replace($time, sprintf('%.6f', $time - self::STEP), $path); + $path = str_replace((string) $time, sprintf('%.6f', $time - self::STEP), $path); file_put_contents($path, json_encode($dummyData)); $time = sprintf('%.6f', $time - self::STEP); } diff --git a/tests/system/HTTP/ResponseSendTest.php b/tests/system/HTTP/ResponseSendTest.php index 437d379fdf9d..f1ceac8cd793 100644 --- a/tests/system/HTTP/ResponseSendTest.php +++ b/tests/system/HTTP/ResponseSendTest.php @@ -127,9 +127,11 @@ public function testRedirectResponseCookies(): void $answer1 = $response->redirect('/login') ->setCookie('foo', 'bar', YEAR) - ->setCookie('login_time', $loginTime, YEAR); + ->setCookie('login_time', (string) $loginTime, YEAR); + $this->assertTrue($answer1->hasCookie('foo', 'bar')); $this->assertTrue($answer1->hasCookie('login_time')); + $response->setBody('Hello'); // send it diff --git a/tests/system/HTTP/ResponseTest.php b/tests/system/HTTP/ResponseTest.php index e08dc1de62a3..212ad674b460 100644 --- a/tests/system/HTTP/ResponseTest.php +++ b/tests/system/HTTP/ResponseTest.php @@ -551,7 +551,7 @@ public function testRedirectResponseCookies(): void $response = new Response(new App()); $answer1 = $response->redirect('/login') ->setCookie('foo', 'bar', YEAR) - ->setCookie('login_time', $loginTime, YEAR); + ->setCookie('login_time', (string) $loginTime, YEAR); $this->assertTrue($answer1->hasCookie('foo')); $this->assertTrue($answer1->hasCookie('login_time')); diff --git a/tests/system/Helpers/CookieHelperTest.php b/tests/system/Helpers/CookieHelperTest.php index 45796658fecc..51a00b6ba0a8 100755 --- a/tests/system/Helpers/CookieHelperTest.php +++ b/tests/system/Helpers/CookieHelperTest.php @@ -250,10 +250,12 @@ public function testSameSiteParamArray(): void public function testSameSiteParam(): void { - set_cookie($this->name, $this->value, $this->expire, '', '', '', '', '', 'Strict'); + set_cookie($this->name, $this->value, $this->expire, '', '', '', null, null, 'Strict'); $this->assertTrue($this->response->hasCookie($this->name)); + $theCookie = $this->response->getCookie($this->name); + $this->assertSame('Strict', $theCookie->getSameSite()); delete_cookie($this->name); diff --git a/tests/system/Helpers/FilesystemHelperTest.php b/tests/system/Helpers/FilesystemHelperTest.php index e92505cc8a91..af682c459f23 100644 --- a/tests/system/Helpers/FilesystemHelperTest.php +++ b/tests/system/Helpers/FilesystemHelperTest.php @@ -92,7 +92,7 @@ public function testDirectoryMapShowsHiddenFiles(): void $root = vfsStream::setup('root', null, $this->structure); $this->assertTrue($root->hasChild('foo')); - $this->assertSame($expected, directory_map(vfsStream::url('root'), false, true)); + $this->assertSame($expected, directory_map(vfsStream::url('root'), 0, true)); } public function testDirectoryMapLimitsRecursion(): void diff --git a/tests/system/Helpers/TextHelperTest.php b/tests/system/Helpers/TextHelperTest.php index 2af7f1387529..20647ec783b1 100755 --- a/tests/system/Helpers/TextHelperTest.php +++ b/tests/system/Helpers/TextHelperTest.php @@ -136,7 +136,7 @@ public function testIncrementString(): void $this->assertSame('file_5', increment_string('file_4')); $this->assertSame('file-5', increment_string('file-4', '-')); $this->assertSame('file-5', increment_string('file-4', '-')); - $this->assertSame('file-1', increment_string('file', '-', '1')); + $this->assertSame('file-1', increment_string('file', '-', 1)); $this->assertSame('124', increment_string('123', '')); }