Skip to content

Commit

Permalink
Upgrading to voku/portable-ascii 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Jan 10, 2023
1 parent f6ffdc0 commit 855adfd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"symfony/string": "^6.0",
"symfony/var-dumper": "^6.0",
"vlucas/phpdotenv": "^5.5",
"voku/portable-ascii": "^1.4"
"voku/portable-ascii": "^2.0"
},
"require-dev": {
"alleyinteractive/alley-coding-standards": "^0.3 || ^0.4 || ^1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/mantle/support/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"nesbot/carbon": "^2.53",
"symfony/finder": "^6.0",
"symfony/var-dumper": "^6.0",
"voku/portable-ascii": "^1.4"
"voku/portable-ascii": "^2.0"
},
"extra": {
"branch-alias": {
Expand Down
4 changes: 2 additions & 2 deletions tests/filesystem/test-filesystem-adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ public function testDownloadNonAsciiFilename() {
$files = new Filesystem_Adapter( $this->filesystem );
$response = $files->download( 'file.txt', 'пиздюк.txt' );
$this->assertInstanceOf( StreamedResponse::class, $response );
$this->assertSame( "attachment; filename=pizdyuk.txt; filename*=utf-8''%D0%BF%D0%B8%D0%B7%D0%B4%D1%8E%D0%BA.txt", $response->headers->get( 'content-disposition' ) );
$this->assertSame( "attachment; filename=pizdiuk.txt; filename*=utf-8''%D0%BF%D0%B8%D0%B7%D0%B4%D1%8E%D0%BA.txt", $response->headers->get( 'content-disposition' ) );
}

public function testDownloadNonAsciiEmptyFilename() {
$this->filesystem->write( 'пиздюк.txt', 'Hello World' );
$files = new Filesystem_Adapter( $this->filesystem );
$response = $files->download( 'пиздюк.txt' );
$this->assertInstanceOf( StreamedResponse::class, $response );
$this->assertSame( 'attachment; filename=pizdyuk.txt; filename*=utf-8\'\'%D0%BF%D0%B8%D0%B7%D0%B4%D1%8E%D0%BA.txt', $response->headers->get( 'content-disposition' ) );
$this->assertSame( 'attachment; filename=pizdiuk.txt; filename*=utf-8\'\'%D0%BF%D0%B8%D0%B7%D0%B4%D1%8E%D0%BA.txt', $response->headers->get( 'content-disposition' ) );
}

public function testDownloadPercentInFilename() {
Expand Down

0 comments on commit 855adfd

Please sign in to comment.