30 $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
31 $this->eavConfig = $this->createPartialMock(\
Magento\Eav\Model\Config::class, [
'getEntityType']);
33 \
Magento\Sales\Model\Increment::class,
34 [
'eavConfig' => $this->eavConfig]
36 $this->type = $this->createPartialMock(\
Magento\Eav\Model\Entity\Type::class, [
'fetchNewIncrementId']);
41 $this->type->expects($this->once())
42 ->method(
'fetchNewIncrementId')
45 $this->eavConfig->expects($this->once())
46 ->method(
'getEntityType')
48 ->willReturn($this->type);
49 $this->model->getNextValue(1);
50 $this->assertEquals(2, $this->model->getCurrentValue());
55 $this->type->expects($this->once())
56 ->method(
'fetchNewIncrementId')
59 $this->eavConfig->expects($this->once())
60 ->method(
'getEntityType')
62 ->willReturn($this->type);
63 $this->assertEquals(2, $this->model->getNextValue(1));