22 $this->eavConfigMock = $this->getMockBuilder(\
Magento\Eav\Model\Config::class)
23 ->disableOriginalConstructor()
26 $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
30 'eavConfig' => $this->eavConfigMock,
39 $attributeMock = $this->getMockBuilder(\
Magento\Eav\Model\Entity\
Attribute\AbstractAttribute::class)
40 ->setMethods([
'save',
'setData'])
41 ->disableOriginalConstructor()
42 ->getMockForAbstractClass();
44 $this->eavConfigMock->expects($this->once())
45 ->method(
'getAttribute')
46 ->with(
'customer',
'disable_auto_group_change')
47 ->willReturn($attributeMock);
49 $attributeMock->expects($this->once())
51 ->with(
'default_value',
$value);
52 $attributeMock->expects($this->once())
55 $this->model->setValue(
$value);
57 $this->assertEquals($this->model, $this->model->afterSave());