34 $this->attributeSetRepositoryMock = $this->getMockBuilder(AttributeSetRepositoryInterface::class)
36 ->getMockForAbstractClass();
37 $this->attributeSetMock = $this->getMockBuilder(AttributeSetInterface::class)
38 ->setMethods([
'getAttributeSetName'])
39 ->getMockForAbstractClass();
47 return $this->objectManager->getObject(AttributeSetText::class, [
48 'context' => $this->contextMock,
49 'uiComponentFactory' => $this->uiComponentFactoryMock,
50 'attributeSetRepository' => $this->attributeSetRepositoryMock,
67 $expectedDataSource = [
78 $this->attributeSetMock->expects($this->once())
79 ->method(
'getAttributeSetName')
80 ->willReturn(self::ATTRIBUTE_SET_NAME);
81 $this->attributeSetRepositoryMock->expects($this->once())
83 ->with(self::ATTRIBUTE_SET_ID)
84 ->willReturn($this->attributeSetMock);
86 $this->assertEquals($expectedDataSource, $this->
getModel()->prepareDataSource($dataSource));
$attributeSetRepositoryMock