/** * @return void */ public function testGetChildComponents() { /** @var \Magento\Framework\View\Element\UiComponentInterface|MockObject $uiComponentMock */ $uiComponentMock = $this->getMock('Magento\\Framework\\View\\Element\\UiComponentInterface'); $name = 'componentName'; $expectedResult = [$name => $uiComponentMock]; $this->abstractComponent->addComponent($name, $uiComponentMock); $this->assertEquals($expectedResult, $this->abstractComponent->getChildComponents()); }
/** * @inheritDoc */ public function getChildComponents() { $result = parent::getChildComponents(); foreach (array_keys($this->columnFilters) as $componentName) { if ($this->getComponent($componentName)) { unset($result[$componentName]); } } return $result; }