File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed
app/code/Magento/CatalogInventory/Test/Unit/Model/Config/Backend
dev/tests/integration/testsuite/Magento Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © 2016 Magento. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
- namespace Magento \CatalogInventory \Test \Unit \Model ;
6
+ namespace Magento \CatalogInventory \Test \Unit \Model \ Config \ Backend ;
7
7
8
8
class ManagestockTest extends \PHPUnit_Framework_TestCase
9
9
{
Original file line number Diff line number Diff line change 16
16
->setTaxClassId (0 )
17
17
->setVisibility (\Magento \Catalog \Model \Product \Visibility::VISIBILITY_BOTH )
18
18
->setStatus (\Magento \Catalog \Model \Product \Attribute \Source \Status::STATUS_ENABLED )
19
- ->save ();
19
+ ->setStockData (
20
+ [
21
+ 'qty ' => 100 ,
22
+ 'is_in_stock ' => 1 ,
23
+ ]
24
+ )->save ();
Original file line number Diff line number Diff line change 28
28
->setPrice (10 )
29
29
->setVisibility (\Magento \Catalog \Model \Product \Visibility::VISIBILITY_BOTH )
30
30
->setStatus (\Magento \Catalog \Model \Product \Attribute \Source \Status::STATUS_ENABLED )
31
- ->save ();
31
+ ->setStockData (
32
+ [
33
+ 'qty ' => 100 ,
34
+ 'is_in_stock ' => 1 ,
35
+ ]
36
+ )->save ();
32
37
$ product ->load (1 );
33
38
34
39
$ billingData = [
Original file line number Diff line number Diff line change 17
17
->setMetaDescription ('meta description ' )
18
18
->setVisibility (\Magento \Catalog \Model \Product \Visibility::VISIBILITY_BOTH )
19
19
->setStatus (\Magento \Catalog \Model \Product \Attribute \Source \Status::STATUS_ENABLED )
20
- ->save ();
20
+ ->setStockData (
21
+ [
22
+ 'qty ' => 100 ,
23
+ 'is_in_stock ' => 1 ,
24
+ ]
25
+ )->save ();
21
26
22
27
$ productRepository = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()
23
28
->create ('Magento\Catalog\Api\ProductRepositoryInterface ' );
You can’t perform that action at this time.
0 commit comments