1 | <?php |
||
8 | class FileSystemPathTest extends TestCase |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $path = './tests/files'; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $files = ['urls.txt', 'images.jpg', 'urls_not_readable.txt']; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $sizes = [121, 8402, 121]; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $types = ['text/plain', 'image/jpeg', 'text/plain']; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $file = './tests/files/urls.txt'; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $imageFile = './tests/files/images.jpg'; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $notReadable = './tests/files/urls_not_readable.txt'; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $notExistsFile = './tests/files/newFilename.txt'; |
||
49 | |||
50 | /** |
||
51 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::__construct |
||
52 | * @return FileSystemPath |
||
53 | */ |
||
54 | public function testCanBeCreated() |
||
61 | |||
62 | /** |
||
63 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::__construct |
||
64 | */ |
||
65 | public function testCantBeCreated() |
||
70 | |||
71 | /** |
||
72 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::rawPath |
||
73 | * @depends testCanBeCreated |
||
74 | */ |
||
75 | public function testCanRetrieveRawPath(FileSystemPath $systemPath) |
||
79 | |||
80 | /** |
||
81 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::rawPath |
||
82 | * @depends testCanBeCreated |
||
83 | */ |
||
84 | public function testCantRetrieveRawPath(FileSystemPath $systemPath) |
||
88 | |||
89 | /** |
||
90 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::pathName |
||
91 | * @depends testCanBeCreated |
||
92 | */ |
||
93 | public function testCanRetrievePathname(FileSystemPath $systemPath) |
||
97 | |||
98 | /** |
||
99 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::pathName |
||
100 | * @depends testCanBeCreated |
||
101 | */ |
||
102 | public function testCantRetrievePathname(FileSystemPath $systemPath) |
||
106 | |||
107 | /** |
||
108 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::filename |
||
109 | * @depends testCanBeCreated |
||
110 | */ |
||
111 | public function testCanRetrieveFilename(FileSystemPath $systemPath) |
||
115 | |||
116 | /** |
||
117 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::filename |
||
118 | * @depends testCanBeCreated |
||
119 | */ |
||
120 | public function testCantRetrieveFilename(FileSystemPath $systemPath) |
||
124 | |||
125 | /** |
||
126 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::size |
||
127 | * @depends testCanBeCreated |
||
128 | */ |
||
129 | public function testCanRetrieveSize(FileSystemPath $systemPath) |
||
133 | |||
134 | /** |
||
135 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::size |
||
136 | * @depends testCanBeCreated |
||
137 | */ |
||
138 | public function testCantRetrieveSize(FileSystemPath $systemPath) |
||
142 | |||
143 | /** |
||
144 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::type |
||
145 | * @depends testCanBeCreated |
||
146 | */ |
||
147 | public function testCanRetrieveType(FileSystemPath $systemPath) |
||
151 | |||
152 | /** |
||
153 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::type |
||
154 | * @depends testCanBeCreated |
||
155 | */ |
||
156 | public function testCantRetrieveType(FileSystemPath $systemPath) |
||
160 | |||
161 | /** |
||
162 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::exists |
||
163 | * @depends testCanBeCreated |
||
164 | */ |
||
165 | public function testExists(FileSystemPath $systemPath) |
||
170 | |||
171 | /** |
||
172 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::exists |
||
173 | */ |
||
174 | public function testNotExists() |
||
180 | |||
181 | /** |
||
182 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemPath::isDirectory |
||
183 | */ |
||
184 | public function testIsDirectory() |
||
189 | } |
||
190 |