slow feature tests replaced with unit tests

This commit is contained in:
Milos Stojanovic
2019-09-06 11:18:51 +02:00
parent 7d06cf6fae
commit 5c1480cd95
2 changed files with 7 additions and 80 deletions

View File

@@ -146,11 +146,16 @@ class TmpfsTest extends TestCase
public function testSanitizeFilename()
{
// regular
$this->assertEquals('test.txt', $this->invokeMethod($this->service, 'sanitizeFilename', ['test.txt']));
$this->assertEquals('断及服务层流.txt', $this->invokeMethod($this->service, 'sanitizeFilename', ['断及服务层流.txt']));
// utf-8
$this->assertEquals('ąčęėįšųū.txt', $this->invokeMethod($this->service, 'sanitizeFilename', ['ąčęėįšųū.txt']));
// remove invalid chars
// multi-byte
$this->assertEquals('断及服务层流.txt', $this->invokeMethod($this->service, 'sanitizeFilename', ['断及服务层流.txt']));
// with invalid chars
$this->assertEquals('..--s-u---pe----rm---an-.t-xt..--', $this->invokeMethod($this->service, 'sanitizeFilename', ["../\\s\"u<:>pe////rm?*|an\\.t\txt../;"]));
}
}