public function setup() { $this->context = $this->getMockForAbstractClass('Magento\\Framework\\View\\Element\\UiComponent\\ContextInterface', [], '', false); $this->uiComponentFactory = $this->getMock('Magento\\Framework\\View\\Element\\UiComponentFactory', [], [], '', false); $this->attributeRepository = $this->getMock('Magento\\Customer\\Ui\\Component\\Listing\\AttributeRepository', [], [], '', false); $this->attributeMetadata = $this->getMockForAbstractClass('\\Magento\\Customer\\Api\\Data\\AttributeMetadataInterface', [], '', false); $this->component = new AttributeColumn($this->context, $this->uiComponentFactory, $this->attributeRepository); $this->component->setData('name', 'gender'); }
public function setup() { $this->context = $this->getMockBuilder('Magento\\Framework\\View\\Element\\UiComponent\\ContextInterface')->getMockForAbstractClass(); $processor = $this->getMockBuilder('Magento\\Framework\\View\\Element\\UiComponent\\Processor')->disableOriginalConstructor()->getMock(); $this->context->expects($this->any())->method('getProcessor')->willReturn($processor); $this->uiComponentFactory = $this->getMock('Magento\\Framework\\View\\Element\\UiComponentFactory', [], [], '', false); $this->attributeRepository = $this->getMock('Magento\\Customer\\Ui\\Component\\Listing\\AttributeRepository', [], [], '', false); $this->attributeMetadata = $this->getMockForAbstractClass('\\Magento\\Customer\\Api\\Data\\AttributeMetadataInterface', [], '', false); $this->component = new AttributeColumn($this->context, $this->uiComponentFactory, $this->attributeRepository); $this->component->setData('name', 'gender'); }