From a8c66c5036a14051a9411ceb736ba84ac165b2ae Mon Sep 17 00:00:00 2001 From: bnomei Date: Thu, 21 Mar 2024 17:43:11 +0000 Subject: [PATCH] :white_check_mark: it merges roots Signed-off-by: bnomei --- tests/AutoloaderTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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(); +});