diff --git a/tests/AutoloaderTest.php b/tests/AutoloaderTest.php index 35e960b..2f65e99 100644 --- a/tests/AutoloaderTest.php +++ b/tests/AutoloaderTest.php @@ -183,3 +183,20 @@ expect($translations['en']['lang'])->toEqual('English'); expect($translations['jp']['lang'])->toEqual('日本語'); }); + +it('can merge roots', function() { + $autoloader = autoloader($this->dir)->toArray([ + 'options' => [ + 'test' => 'Test', + ], + 'blueprints' => [ + 'fields/test' => [ // <-- this must be merged + 'type' => 'info', + 'text' => 'Test', + ], + ], + ]); + + expect($autoloader['blueprints']['pages/isphp'])->toBeArray(); + expect($autoloader['blueprints']['fields/test'])->toBeArray(); +});