Skip to content

Commit

Permalink
TASK: Introduce NodeTypeManager::createFromArrayConfiguration to be…
Browse files Browse the repository at this point in the history
…tter document use-case
  • Loading branch information
mhsdesign committed Nov 20, 2024
1 parent 526d929 commit 1939347
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Fakes/FakeNodeTypeManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function build(ContentRepositoryId $contentRepositoryId, array $options):
}
if (isset($options['nodeTypes'])) {
// allows to be configured for testing
return new NodeTypeManager(fn (): array => $options['nodeTypes']);
return NodeTypeManager::createFromArrayConfiguration($options['nodeTypes']);
}
throw new \RuntimeException('NodeTypeManagerFactory uninitialized');
}
Expand All @@ -46,8 +46,8 @@ public function build(ContentRepositoryId $contentRepositoryId, array $options):
*/
public static function setConfiguration(array $nodeTypesToUse): void
{
self::$nodeTypeManager = new NodeTypeManager(
fn (): array => $nodeTypesToUse
self::$nodeTypeManager = NodeTypeManager::createFromArrayConfiguration(
$nodeTypesToUse
);
}

Expand Down

0 comments on commit 1939347

Please sign in to comment.