@@ -42,10 +42,13 @@ protected function setUp()
42
42
43
43
$ this ->filesystem ->touch ($ this ->directory .'/en.txt ' );
44
44
$ this ->filesystem ->touch ($ this ->directory .'/en_alias.txt ' );
45
+ $ this ->filesystem ->touch ($ this ->directory .'/en_child.txt ' );
45
46
$ this ->filesystem ->touch ($ this ->directory .'/de.txt ' );
46
47
$ this ->filesystem ->touch ($ this ->directory .'/de_alias.txt ' );
48
+ $ this ->filesystem ->touch ($ this ->directory .'/de_child.txt ' );
47
49
$ this ->filesystem ->touch ($ this ->directory .'/fr.txt ' );
48
50
$ this ->filesystem ->touch ($ this ->directory .'/fr_alias.txt ' );
51
+ $ this ->filesystem ->touch ($ this ->directory .'/fr_child.txt ' );
49
52
$ this ->filesystem ->touch ($ this ->directory .'/root.txt ' );
50
53
$ this ->filesystem ->touch ($ this ->directory .'/supplementalData.txt ' );
51
54
$ this ->filesystem ->touch ($ this ->directory .'/supplementaldata.txt ' );
@@ -54,6 +57,9 @@ protected function setUp()
54
57
file_put_contents ($ this ->directory .'/en_alias.txt ' , 'en_alias{"%%ALIAS"{"en"}} ' );
55
58
file_put_contents ($ this ->directory .'/de_alias.txt ' , 'de_alias{"%%ALIAS"{"de"}} ' );
56
59
file_put_contents ($ this ->directory .'/fr_alias.txt ' , 'fr_alias{"%%ALIAS"{"fr"}} ' );
60
+ file_put_contents ($ this ->directory .'/en_child.txt ' , 'en_GB{%%Parent{"en"}} ' );
61
+ file_put_contents ($ this ->directory .'/de_child.txt ' , 'en_GB{%%Parent{"de"}} ' );
62
+ file_put_contents ($ this ->directory .'/fr_child.txt ' , 'en_GB{%%Parent{"fr"}} ' );
57
63
}
58
64
59
65
protected function tearDown ()
@@ -63,7 +69,7 @@ protected function tearDown()
63
69
64
70
public function testScanLocales ()
65
71
{
66
- $ sortedLocales = array ('de ' , 'de_alias ' , 'en ' , 'en_alias ' , 'fr ' , 'fr_alias ' );
72
+ $ sortedLocales = array ('de ' , 'de_alias ' , 'de_child ' , ' en ' , 'en_alias ' , 'en_child ' , ' fr ' , 'fr_alias ' , ' fr_child ' );
67
73
68
74
$ this ->assertSame ($ sortedLocales , $ this ->scanner ->scanLocales ($ this ->directory ));
69
75
}
@@ -74,4 +80,11 @@ public function testScanAliases()
74
80
75
81
$ this ->assertSame ($ sortedAliases , $ this ->scanner ->scanAliases ($ this ->directory ));
76
82
}
83
+
84
+ public function testScanParents ()
85
+ {
86
+ $ sortedParents = array ('de_child ' => 'de ' , 'en_child ' => 'en ' , 'fr_child ' => 'fr ' );
87
+
88
+ $ this ->assertSame ($ sortedParents , $ this ->scanner ->scanParents ($ this ->directory ));
89
+ }
77
90
}
0 commit comments