Skip to content

Commit

Permalink
Merge pull request #1485 from garak/add-ext
Browse files Browse the repository at this point in the history
🎨 add gpx to extension map
  • Loading branch information
garak authored Dec 31, 2024
2 parents 99b1aad + 1213339 commit 79fd69a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Naming/Polyfill/FileExtensionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ trait FileExtensionTrait
// extensions safe to keep
private static array $keep = [
'txt' => 'csv',
'xml' => 'gpx',
];

/**
Expand Down
1 change: 1 addition & 0 deletions tests/Naming/SmartUniqidNamerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static function fileDataProvider(): array
'dot in filename' => ['filename has . spaces (2).jpg', 'jpg', '/filename-has-spaces-2-[[:xdigit:]]{22}\.jpg/'],
'file with no extension with null mimetype' => ['lala', null, '/lala-[[:xdigit:]]{22}$/'],
'csv retains extension even if guessed as txt' => ['lala.csv', 'txt', '/lala-[[:xdigit:]]{22}\.csv/'],
'gpx retains extension even if guessed as xml' => ['baz.gpx', 'xml', '/^baz-[[:xdigit:]]{22}\.gpx$/'],
];
}

Expand Down

0 comments on commit 79fd69a

Please sign in to comment.