@@ -42,10 +42,13 @@ protected function setUp()
4242
4343 $ this ->filesystem ->touch ($ this ->directory .'/en.txt ' );
4444 $ this ->filesystem ->touch ($ this ->directory .'/en_alias.txt ' );
45+ $ this ->filesystem ->touch ($ this ->directory .'/en_child.txt ' );
4546 $ this ->filesystem ->touch ($ this ->directory .'/de.txt ' );
4647 $ this ->filesystem ->touch ($ this ->directory .'/de_alias.txt ' );
48+ $ this ->filesystem ->touch ($ this ->directory .'/de_child.txt ' );
4749 $ this ->filesystem ->touch ($ this ->directory .'/fr.txt ' );
4850 $ this ->filesystem ->touch ($ this ->directory .'/fr_alias.txt ' );
51+ $ this ->filesystem ->touch ($ this ->directory .'/fr_child.txt ' );
4952 $ this ->filesystem ->touch ($ this ->directory .'/root.txt ' );
5053 $ this ->filesystem ->touch ($ this ->directory .'/supplementalData.txt ' );
5154 $ this ->filesystem ->touch ($ this ->directory .'/supplementaldata.txt ' );
@@ -54,6 +57,9 @@ protected function setUp()
5457 file_put_contents ($ this ->directory .'/en_alias.txt ' , 'en_alias{"%%ALIAS"{"en"}} ' );
5558 file_put_contents ($ this ->directory .'/de_alias.txt ' , 'de_alias{"%%ALIAS"{"de"}} ' );
5659 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"}} ' );
5763 }
5864
5965 protected function tearDown ()
@@ -63,7 +69,7 @@ protected function tearDown()
6369
6470 public function testScanLocales ()
6571 {
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 ' );
6773
6874 $ this ->assertSame ($ sortedLocales , $ this ->scanner ->scanLocales ($ this ->directory ));
6975 }
@@ -74,4 +80,11 @@ public function testScanAliases()
7480
7581 $ this ->assertSame ($ sortedAliases , $ this ->scanner ->scanAliases ($ this ->directory ));
7682 }
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+ }
7790}
0 commit comments