| @@ 784-794 (lines=11) @@ | ||
| 781 | $this->assertEquals(6, $info->getSize()); |
|
| 782 | } |
|
| 783 | ||
| 784 | function absolutePathProvider() { |
|
| 785 | return array( |
|
| 786 | array('/files/', ''), |
|
| 787 | array('/files/0', '0'), |
|
| 788 | array('/files/false', 'false'), |
|
| 789 | array('/files/true', 'true'), |
|
| 790 | array('/files/', '/'), |
|
| 791 | array('/files/test', 'test'), |
|
| 792 | array('/files/test', '/test'), |
|
| 793 | ); |
|
| 794 | } |
|
| 795 | ||
| 796 | /** |
|
| 797 | * @dataProvider relativePathProvider |
|
| @@ 806-816 (lines=11) @@ | ||
| 803 | $this->assertEquals($expectedPath, $view->getRelativePath($absolutePath)); |
|
| 804 | } |
|
| 805 | ||
| 806 | function relativePathProvider() { |
|
| 807 | return array( |
|
| 808 | array('/files/', '/'), |
|
| 809 | array('/files', '/'), |
|
| 810 | array('/files/0', '0'), |
|
| 811 | array('/files/false', 'false'), |
|
| 812 | array('/files/true', 'true'), |
|
| 813 | array('/files/test', 'test'), |
|
| 814 | array('/files/test/foo', 'test/foo'), |
|
| 815 | ); |
|
| 816 | } |
|
| 817 | ||
| 818 | public function testFileView() { |
|
| 819 | $storage = new Temporary(array()); |
|