getChildNodeDefinitions example


    abstract protected function createNode(): NodeInterface;

    /** * Set PathSeparator to use. * * @return $this */
    public function setPathSeparator(string $separator)static
    {
        if ($this instanceof ParentNodeDefinitionInterface) {
            foreach ($this->getChildNodeDefinitions() as $child) {
                $child->setPathSeparator($separator);
            }
        }

        $this->pathSeparator = $separator;

        return $this;
    }
}
static::assertInstanceOf(TreeBuilder::class$tree);
        static::assertSame('shopware', $tree->buildTree()->getName());
    }

    public function testHtmlSanitizerConfigTreeNode(): void
    {
        $configuration = new Configuration();

        $rootNode = $configuration->getConfigTreeBuilder()->getRootNode();

        static::assertInstanceOf(ArrayNodeDefinition::class$rootNode);
        $nodes = $rootNode->getChildNodeDefinitions();

        static::assertArrayHasKey('html_sanitizer', $nodes);
        $node = $nodes['html_sanitizer'];
        static::assertInstanceOf(ArrayNodeDefinition::class$node);

        $nodes = $node->getChildNodeDefinitions();

        static::assertInstanceOf(VariableNodeDefinition::class$nodes['cache_dir']);
        static::assertInstanceOf(ArrayNodeDefinition::class$nodes['sets']);
        static::assertInstanceOf(ArrayNodeDefinition::class$nodes['fields']);

        
Home | Imprint | This part of the site doesn't use cookies.