Skip to content

Commit 08c04e1

Browse files
author
Olexii Korshenko
committed
MAGETWO-34143: DB Foreign Keys Management on the Application Level. Builds Stabilization
1 parent 6d7eefc commit 08c04e1

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

app/code/Magento/ProductAlert/Model/Resource/Stock.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ class Stock extends \Magento\ProductAlert\Model\Resource\AbstractResource
2525
*/
2626
public function __construct(
2727
\Magento\Framework\Model\Resource\Db\Context $context,
28-
\Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory
28+
\Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory,
29+
$resourcePrefix = null
2930
) {
3031
$this->_dateFactory = $dateFactory;
3132
parent::__construct($context, $resourcePrefix);

dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,12 @@ public function testSave($attributeCode, $attributeSetId, $productData, $product
262262
);
263263

264264
$backendModel->setAttribute($attribute);
265-
266265
$attribute->expects($this->any())->method('getBackend')->will($this->returnValue($backendModel));
267266
$attribute->setId(222);
268-
269267
$attributes[$attributeCode] = $attribute;
270-
271268
$eavConfig = $this->getMockBuilder('Magento\Eav\Model\Config')
272269
->disableOriginalConstructor()
273270
->getMock();
274-
275271
$objectManager = new ObjectManager($this);
276272
$this->eavConfig = $this->getMock('Magento\Eav\Model\Config', [], [], '', false);
277273
$arguments = $objectManager->getConstructArguments(
@@ -285,13 +281,11 @@ public function testSave($attributeCode, $attributeSetId, $productData, $product
285281
]
286282
]
287283
);
288-
289284
/** @var $model \Magento\Framework\Model\AbstractModel|\PHPUnit_Framework_MockObject_MockObject */
290285
$model = $this->getMockBuilder('Magento\Eav\Model\Entity\AbstractEntity')
291286
->setConstructorArgs($arguments)
292287
->setMethods(['_getValue', 'beginTransaction', 'commit', 'rollback'])
293288
->getMock();
294-
295289
$model->expects($this->any())->method('_getValue')->will($this->returnValue($eavConfig));
296290
$eavConfig->expects($this->any())->method('getAttribute')->will(
297291
$this->returnCallback(
@@ -300,10 +294,8 @@ function ($entityType, $attributeCode) use ($attributes) {
300294
}
301295
)
302296
);
303-
304297
$model->setConnection($this->_getAdapterMock());
305298
$model->isPartialSave(true);
306-
307299
$model->save($object);
308300
}
309301

0 commit comments

Comments
 (0)