diff options
Diffstat (limited to 'tests/lib/encryption/utiltest.php')
-rw-r--r-- | tests/lib/encryption/utiltest.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lib/encryption/utiltest.php b/tests/lib/encryption/utiltest.php index 0154fa30f7d..d3a4e211daa 100644 --- a/tests/lib/encryption/utiltest.php +++ b/tests/lib/encryption/utiltest.php @@ -174,4 +174,24 @@ class UtilTest extends TestCase { ); } + /** + * @dataProvider dataTestStripPartialFileExtension + * + * @param string $path + * @param string $expected + */ + public function testStripPartialFileExtension($path, $expected) { + $this->assertSame($expected, + $this->util->stripPartialFileExtension($path)); + } + + public function dataTestStripPartialFileExtension() { + return array( + array('/foo/test.txt', '/foo/test.txt'), + array('/foo/test.txt.part', '/foo/test.txt'), + array('/foo/test.txt.ocTransferId7567846853.part', '/foo/test.txt'), + array('/foo/test.txt.ocTransferId7567.part', '/foo/test.txt'), + ); + } + } |