From 0fff3c9698b036a4295935569db7220068f9883f Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Tue, 19 Mar 2013 16:53:37 +0100 Subject: adding extension to slugified physical path --- tests/lib/files/mapper.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/lib/files/mapper.php (limited to 'tests/lib/files/mapper.php') diff --git a/tests/lib/files/mapper.php b/tests/lib/files/mapper.php new file mode 100644 index 00000000000..36221f8bcaa --- /dev/null +++ b/tests/lib/files/mapper.php @@ -0,0 +1,41 @@ +. + * + */ + +namespace Test\Files; + +class Mapper extends \PHPUnit_Framework_TestCase { + + /** + * @var \OC\Files\Mapper + */ + private $mapper = null; + + public function setUp() { + $this->mapper = new \OC\Files\Mapper('D:/'); + } + + public function testSlugifyPath() { + $this->assertEquals('D:/text.txt', $this->mapper->slugifyPath('D:/text.txt')); + $this->assertEquals('D:/text-2.txt', $this->mapper->slugifyPath('D:/text.txt', 2)); + $this->assertEquals('D:/a/b/text.txt', $this->mapper->slugifyPath('D:/a/b/text.txt')); + } +} -- cgit v1.2.3