Skip to content

Commit 10d2a54

Browse files
gr8manmichalsn
andcommitted
Update tests/system/HTTP/ResponseTest.php
Co-authored-by: Michal Sniatala <michal@sniatala.pl>
1 parent 5d78e1d commit 10d2a54

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

tests/system/HTTP/ResponseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ public function testGetDownloadResponseByExtremeFilePath(): void
498498
{
499499
$response = new Response(new App());
500500

501-
$tempDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'ci4_test_dir';
502-
@mkdir($tempDir);
501+
$tempDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'ci4_test_dir_' . bin2hex(random_bytes(8));
502+
$this->assertTrue(mkdir($tempDir));
503503
$tempDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'ci4_test_dir_' . bin2hex(random_bytes(8));
504504
$this->assertTrue(mkdir($tempDir));
505505
$extremeName = 'my_extreme_file_!@#$%.txt';

user_guide_src/source/changelogs/v4.7.4.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Message Changes
2222
Changes
2323
*******
2424

25+
- **HTTP:** Optimized ``ResponseTrait::download()`` to use ``basename()`` for filename extraction instead of string replacement and array explosion, improving performance.
26+
2527
************
2628
Deprecations
2729
************

0 commit comments

Comments
 (0)