35 $this->context = $this->getMockForAbstractClass(
36 \
Magento\Framework\View\Element\UiComponent\ContextInterface::class,
41 $this->componentFactory = $this->createPartialMock(
42 \
Magento\Framework\View\Element\UiComponentFactory::class,
45 $this->attributeMetadata = $this->getMockForAbstractClass(
46 \
Magento\Customer\Api\Data\AttributeMetadataInterface::class,
51 $this->column = $this->getMockForAbstractClass(
52 \
Magento\Ui\Component\Listing\Columns\ColumnInterface::class,
57 $this->attributeOption = $this->getMockForAbstractClass(
58 \
Magento\Customer\Api\Data\OptionInterface::class,
64 $this->inlineEditUpdater = $this->getMockBuilder(
65 \
Magento\Customer\Ui\Component\Listing\Column\InlineEditUpdater::class
67 ->disableOriginalConstructor()
70 $this->columnFactory =
new ColumnFactory($this->componentFactory, $this->inlineEditUpdater);
75 $columnName =
'created_at';
79 'component' =>
'Magento_Ui/js/grid/columns/column',
82 'label' =>
__(
'Label'),
92 'component' =>
'Magento_Ui/js/grid/columns/column',
98 'attribute_code' =>
'billing_attribute_code',
99 'frontend_input' =>
'text',
100 'frontend_label' =>
'Label',
101 'backend_type' =>
'backend-type',
108 'is_used_in_grid' =>
true,
109 'is_visible_in_grid' =>
true,
110 'is_filterable_in_grid' =>
true,
111 'is_searchable_in_grid' =>
true,
112 'entity_type_code' =>
'customer',
113 'validation_rules' => [],
116 $this->inlineEditUpdater->expects($this->once())
117 ->method(
'applyEditing')
118 ->with($this->column,
'text', []);
119 $this->componentFactory->expects($this->once())
121 ->with($columnName,
'column',
$config)
122 ->willReturn($this->column);
126 $this->columnFactory->create(
$attributeData, $columnName, $this->context)