From 220290d61cedbf719e21bd1e9e64b7b44552c8f9 Mon Sep 17 00:00:00 2001 From: Christopher Darling Date: Tue, 26 Apr 2016 14:08:31 +0100 Subject: [PATCH] test to prove #5222 --- tests/filesystem/UploadTest.php | 7 +++++++ 1 file changed, 7 insertions(+) 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(); }