fix for filename sanitize/cut

This commit is contained in:
Milos Stojanovic
2019-09-09 10:10:59 +02:00
parent 5c1480cd95
commit 4258e68d8f
2 changed files with 8 additions and 10 deletions

View File

@@ -157,5 +157,12 @@ class TmpfsTest extends TestCase
// with invalid chars
$this->assertEquals('..--s-u---pe----rm---an-.t-xt..--', $this->invokeMethod($this->service, 'sanitizeFilename', ["../\\s\"u<:>pe////rm?*|an\\.t\txt../;"]));
// oversized
$this->assertEquals(
'123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345',
$this->invokeMethod($this->service, 'sanitizeFilename', [
'1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456'
]));
}
}