@@ -20,13 +20,13 @@ class AssetMapperRepositoryTest extends TestCase
2020 public function testFindWithAbsolutePaths ()
2121 {
2222 $ repository = new AssetMapperRepository ([
23- __DIR__ .'/fixtures /dir1 ' => '' ,
24- __DIR__ .'/fixtures /dir2 ' => '' ,
23+ __DIR__ .'/Fixtures /dir1 ' => '' ,
24+ __DIR__ .'/Fixtures /dir2 ' => '' ,
2525 ], __DIR__ );
2626
27- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir1/file1.css ' ), $ repository ->find ('file1.css ' ));
28- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir2/file4.js ' ), $ repository ->find ('file4.js ' ));
29- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir2/subdir/file5.js ' ), $ repository ->find ('subdir/file5.js ' ));
27+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir1/file1.css ' ), $ repository ->find ('file1.css ' ));
28+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir2/file4.js ' ), $ repository ->find ('file4.js ' ));
29+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir2/subdir/file5.js ' ), $ repository ->find ('subdir/file5.js ' ));
3030 $ this ->assertNull ($ repository ->find ('file5.css ' ));
3131 }
3232
@@ -35,34 +35,34 @@ public function testFindWithRelativePaths()
3535 $ repository = new AssetMapperRepository ([
3636 'dir1 ' => '' ,
3737 'dir2 ' => '' ,
38- ], __DIR__ .'/fixtures ' );
38+ ], __DIR__ .'/Fixtures ' );
3939
40- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir1/file1.css ' ), $ repository ->find ('file1.css ' ));
41- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir2/file4.js ' ), $ repository ->find ('file4.js ' ));
42- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir2/subdir/file5.js ' ), $ repository ->find ('subdir/file5.js ' ));
40+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir1/file1.css ' ), $ repository ->find ('file1.css ' ));
41+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir2/file4.js ' ), $ repository ->find ('file4.js ' ));
42+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir2/subdir/file5.js ' ), $ repository ->find ('subdir/file5.js ' ));
4343 $ this ->assertNull ($ repository ->find ('file5.css ' ));
4444 }
4545
4646 public function testFindWithMovingPaths ()
4747 {
4848 $ repository = new AssetMapperRepository ([
49- __DIR__ .'/../Tests/fixtures /dir2 ' => '' ,
49+ __DIR__ .'/../Tests/Fixtures /dir2 ' => '' ,
5050 ], __DIR__ );
5151
52- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir2/file4.js ' ), $ repository ->find ('file4.js ' ));
53- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir2/file4.js ' ), $ repository ->find ('subdir/../file4.js ' ));
52+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir2/file4.js ' ), $ repository ->find ('file4.js ' ));
53+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir2/file4.js ' ), $ repository ->find ('subdir/../file4.js ' ));
5454 }
5555
5656 public function testFindWithNamespaces ()
5757 {
5858 $ repository = new AssetMapperRepository ([
5959 'dir1 ' => 'dir1_namespace ' ,
6060 'dir2 ' => 'dir2_namespace ' ,
61- ], __DIR__ .'/fixtures ' );
61+ ], __DIR__ .'/Fixtures ' );
6262
63- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir1/file1.css ' ), $ repository ->find ('dir1_namespace/file1.css ' ));
64- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir2/file4.js ' ), $ repository ->find ('dir2_namespace/file4.js ' ));
65- $ this ->assertSame (realpath (__DIR__ .'/fixtures /dir2/subdir/file5.js ' ), $ repository ->find ('dir2_namespace/subdir/file5.js ' ));
63+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir1/file1.css ' ), $ repository ->find ('dir1_namespace/file1.css ' ));
64+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir2/file4.js ' ), $ repository ->find ('dir2_namespace/file4.js ' ));
65+ $ this ->assertSame (realpath (__DIR__ .'/Fixtures /dir2/subdir/file5.js ' ), $ repository ->find ('dir2_namespace/subdir/file5.js ' ));
6666 // non-namespaced path does not work
6767 $ this ->assertNull ($ repository ->find ('file4.js ' ));
6868 }
@@ -73,10 +73,10 @@ public function testFindLogicalPath()
7373 'dir ' => '' ,
7474 'dir1 ' => 'some_namespace ' ,
7575 'dir2 ' => '' ,
76- ], __DIR__ .'/fixtures ' );
77- $ this ->assertSame ('subdir/file5.js ' , $ repository ->findLogicalPath (__DIR__ .'/fixtures /dir2/subdir/file5.js ' ));
78- $ this ->assertSame ('some_namespace/file2.js ' , $ repository ->findLogicalPath (__DIR__ .'/fixtures /dir1/file2.js ' ));
79- $ this ->assertSame ('some_namespace/file2.js ' , $ repository ->findLogicalPath (__DIR__ .'/../Tests/fixtures /dir1/file2.js ' ));
76+ ], __DIR__ .'/Fixtures ' );
77+ $ this ->assertSame ('subdir/file5.js ' , $ repository ->findLogicalPath (__DIR__ .'/Fixtures /dir2/subdir/file5.js ' ));
78+ $ this ->assertSame ('some_namespace/file2.js ' , $ repository ->findLogicalPath (__DIR__ .'/Fixtures /dir1/file2.js ' ));
79+ $ this ->assertSame ('some_namespace/file2.js ' , $ repository ->findLogicalPath (__DIR__ .'/../Tests/Fixtures /dir1/file2.js ' ));
8080 }
8181
8282 public function testAll ()
@@ -85,21 +85,21 @@ public function testAll()
8585 'dir1 ' => '' ,
8686 'dir2 ' => '' ,
8787 'dir3 ' => '' ,
88- ], __DIR__ .'/fixtures ' );
88+ ], __DIR__ .'/Fixtures ' );
8989
9090 $ actualAllAssets = $ repository ->all ();
9191 $ this ->assertCount (8 , $ actualAllAssets );
9292
9393 // use realpath to normalize slashes on Windows for comparison
9494 $ expectedAllAssets = array_map ('realpath ' , [
95- 'file1.css ' => __DIR__ .'/fixtures /dir1/file1.css ' ,
96- 'file2.js ' => __DIR__ .'/fixtures /dir1/file2.js ' ,
97- 'already-abcdefVWXYZ0123456789.digested.css ' => __DIR__ .'/fixtures /dir2/already-abcdefVWXYZ0123456789.digested.css ' ,
98- 'file3.css ' => __DIR__ .'/fixtures /dir2/file3.css ' ,
99- 'file4.js ' => __DIR__ .'/fixtures /dir2/file4.js ' ,
100- 'subdir/file5.js ' => __DIR__ .'/fixtures /dir2/subdir/file5.js ' ,
101- 'subdir/file6.js ' => __DIR__ .'/fixtures /dir2/subdir/file6.js ' ,
102- 'test.gif.foo ' => __DIR__ .'/fixtures /dir3/test.gif.foo ' ,
95+ 'file1.css ' => __DIR__ .'/Fixtures /dir1/file1.css ' ,
96+ 'file2.js ' => __DIR__ .'/Fixtures /dir1/file2.js ' ,
97+ 'already-abcdefVWXYZ0123456789.digested.css ' => __DIR__ .'/Fixtures /dir2/already-abcdefVWXYZ0123456789.digested.css ' ,
98+ 'file3.css ' => __DIR__ .'/Fixtures /dir2/file3.css ' ,
99+ 'file4.js ' => __DIR__ .'/Fixtures /dir2/file4.js ' ,
100+ 'subdir/file5.js ' => __DIR__ .'/Fixtures /dir2/subdir/file5.js ' ,
101+ 'subdir/file6.js ' => __DIR__ .'/Fixtures /dir2/subdir/file6.js ' ,
102+ 'test.gif.foo ' => __DIR__ .'/Fixtures /dir3/test.gif.foo ' ,
103103 ]);
104104 $ this ->assertEquals ($ expectedAllAssets , array_map ('realpath ' , $ actualAllAssets ));
105105 }
@@ -110,17 +110,17 @@ public function testAllWithNamespaces()
110110 'dir1 ' => 'dir1_namespace ' ,
111111 'dir2 ' => 'dir2_namespace ' ,
112112 'dir3 ' => 'dir3_namespace ' ,
113- ], __DIR__ .'/fixtures ' );
113+ ], __DIR__ .'/Fixtures ' );
114114
115115 $ expectedAllAssets = [
116- 'dir1_namespace/file1.css ' => __DIR__ .'/fixtures /dir1/file1.css ' ,
117- 'dir1_namespace/file2.js ' => __DIR__ .'/fixtures /dir1/file2.js ' ,
118- 'dir2_namespace/already-abcdefVWXYZ0123456789.digested.css ' => __DIR__ .'/fixtures /dir2/already-abcdefVWXYZ0123456789.digested.css ' ,
119- 'dir2_namespace/file3.css ' => __DIR__ .'/fixtures /dir2/file3.css ' ,
120- 'dir2_namespace/file4.js ' => __DIR__ .'/fixtures /dir2/file4.js ' ,
121- 'dir2_namespace/subdir/file5.js ' => __DIR__ .'/fixtures /dir2/subdir/file5.js ' ,
122- 'dir2_namespace/subdir/file6.js ' => __DIR__ .'/fixtures /dir2/subdir/file6.js ' ,
123- 'dir3_namespace/test.gif.foo ' => __DIR__ .'/fixtures /dir3/test.gif.foo ' ,
116+ 'dir1_namespace/file1.css ' => __DIR__ .'/Fixtures /dir1/file1.css ' ,
117+ 'dir1_namespace/file2.js ' => __DIR__ .'/Fixtures /dir1/file2.js ' ,
118+ 'dir2_namespace/already-abcdefVWXYZ0123456789.digested.css ' => __DIR__ .'/Fixtures /dir2/already-abcdefVWXYZ0123456789.digested.css ' ,
119+ 'dir2_namespace/file3.css ' => __DIR__ .'/Fixtures /dir2/file3.css ' ,
120+ 'dir2_namespace/file4.js ' => __DIR__ .'/Fixtures /dir2/file4.js ' ,
121+ 'dir2_namespace/subdir/file5.js ' => __DIR__ .'/Fixtures /dir2/subdir/file5.js ' ,
122+ 'dir2_namespace/subdir/file6.js ' => __DIR__ .'/Fixtures /dir2/subdir/file6.js ' ,
123+ 'dir3_namespace/test.gif.foo ' => __DIR__ .'/Fixtures /dir3/test.gif.foo ' ,
124124 ];
125125
126126 $ normalizedExpectedAllAssets = array_map ('realpath ' , $ expectedAllAssets );
@@ -146,7 +146,7 @@ public function testExcludedPaths()
146146 'dir1 ' => '' ,
147147 'dir2 ' => '' ,
148148 'dir3 ' => '' ,
149- ], __DIR__ .'/fixtures ' , $ excludedGlobs );
149+ ], __DIR__ .'/Fixtures ' , $ excludedGlobs );
150150
151151 $ expectedAssets = [
152152 'file1.css ' ,
@@ -160,6 +160,6 @@ public function testExcludedPaths()
160160 $ this ->assertEquals ($ expectedAssets , $ actualAssets );
161161
162162 $ this ->assertNull ($ repository ->find ('file3.css ' ));
163- $ this ->assertNull ($ repository ->findLogicalPath (__DIR__ .'/fixtures /dir2/file3.css ' ));
163+ $ this ->assertNull ($ repository ->findLogicalPath (__DIR__ .'/Fixtures /dir2/file3.css ' ));
164164 }
165165}
0 commit comments