mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
test to prove #5222
This commit is contained in:
parent
d1c7554c1e
commit
220290d61c
@ -177,6 +177,13 @@ class UploadTest extends SapphireTest {
|
|||||||
$retrievedSize = $v->getAllowedMaxFileSize('txt');
|
$retrievedSize = $v->getAllowedMaxFileSize('txt');
|
||||||
$this->assertEquals(4096, $retrievedSize, 'Max file size check on instance values failed (instance extension set check)');
|
$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();
|
Config::unnest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user