diff --git a/tests/filesystem/UploadTest.php b/tests/filesystem/UploadTest.php index 92841fb59..5c02e9447 100644 --- a/tests/filesystem/UploadTest.php +++ b/tests/filesystem/UploadTest.php @@ -176,6 +176,13 @@ class UploadTest extends SapphireTest { $retrievedSize = $v->getAllowedMaxFileSize('txt'); $this->assertEquals(4096, $retrievedSize, 'Max file size check on instance values failed (instance extension set check)'); + + // Check a wildcard max file size against a file with an extension + $v = new UploadTest_Validator(); + $v->setAllowedMaxFileSize(2000); + + $retrievedSize = $v->getAllowedMaxFileSize('.jpg'); + $this->assertEquals(2000, $retrievedSize, 'Max file size check on instance values failed (wildcard max file size)'); Config::unnest(); }