diff --git a/tests/system/CommonFunctionsSendTest.php b/tests/system/CommonFunctionsSendTest.php index 462303aa68b9..f26e40cadf14 100644 --- a/tests/system/CommonFunctionsSendTest.php +++ b/tests/system/CommonFunctionsSendTest.php @@ -45,7 +45,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 176b21def156..7dc3be9b1ae5 100644 --- a/tests/system/CommonFunctionsTest.php +++ b/tests/system/CommonFunctionsTest.php @@ -578,7 +578,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 fdc1ff0e5e9d..94297c6d1c63 100644 --- a/tests/system/Debug/Toolbar/Collectors/HistoryTest.php +++ b/tests/system/Debug/Toolbar/Collectors/HistoryTest.php @@ -63,7 +63,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 0d10d8b91090..5e46b341a288 100644 --- a/tests/system/HTTP/ResponseSendTest.php +++ b/tests/system/HTTP/ResponseSendTest.php @@ -129,9 +129,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 0a5373c2d17f..f8de63d1f1b0 100644 --- a/tests/system/HTTP/ResponseTest.php +++ b/tests/system/HTTP/ResponseTest.php @@ -553,7 +553,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 22f188af5d31..f305173b7109 100755 --- a/tests/system/Helpers/CookieHelperTest.php +++ b/tests/system/Helpers/CookieHelperTest.php @@ -252,10 +252,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 26d199c29dfc..8164e5e7b6df 100644 --- a/tests/system/Helpers/FilesystemHelperTest.php +++ b/tests/system/Helpers/FilesystemHelperTest.php @@ -94,7 +94,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 3ae32bf9e1bc..1cc4def05869 100755 --- a/tests/system/Helpers/TextHelperTest.php +++ b/tests/system/Helpers/TextHelperTest.php @@ -138,7 +138,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', '')); }