Skip to content

Commit 932b845

Browse files
author
Paliarush, Alexander(apaliarush)
committed
Merge pull request #325 from magento-api/develop
[API] Sprint 49 Bugfixes + Task
2 parents 183254f + 5afa00a commit 932b845

File tree

60 files changed

+473
-251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+473
-251
lines changed

app/code/Magento/Backend/Test/Unit/App/UserConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class UserConfigTest extends \PHPUnit_Framework_TestCase
1010
{
1111
public function testUserRequestCreation()
1212
{
13-
$factoryMock = $this->getMock('Magento\Config\Model\Config\Factory', [], [], '', false);
13+
$factoryMock = $this->getMock('Magento\Config\Model\Config\Factory', ['create'], [], '', false);
1414
$responseMock = $this->getMock('Magento\Framework\App\Console\Response', [], [], '', false);
1515
$configMock = $this->getMock('Magento\Config\Model\Config', [], [], '', false);
1616

app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ protected function setUp()
177177
);
178178
$this->orderFactoryMock = $this->getMock(
179179
'Magento\Sales\Model\OrderFactory',
180-
[],
180+
['create'],
181181
[],
182182
'',
183183
false

app/code/Magento/Backup/Test/Unit/Controller/Adminhtml/Index/DownloadTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public function setUp()
9494
->getMock();
9595
$this->backupModelFactoryMock = $this->getMockBuilder('Magento\Backup\Model\BackupFactory')
9696
->disableOriginalConstructor()
97+
->setMethods(['create'])
9798
->getMock();
9899
$this->backupModelMock = $this->getMockBuilder('Magento\Backup\Model\Backup')
99100
->disableOriginalConstructor()

app/code/Magento/Bundle/Test/Unit/Model/Plugin/BundleLoadOptionsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ protected function setUp()
3535
{
3636
$this->optionListMock = $this->getMock('\Magento\Bundle\Model\Product\OptionList', [], [], '', false);
3737
$this->productExtensionFactory = $this->getMockBuilder('\Magento\Catalog\Api\Data\ProductExtensionFactory')
38+
->setMethods(['create'])
3839
->disableOriginalConstructor()
3940
->getMock();
4041
$this->model = new \Magento\Bundle\Model\Plugin\BundleLoadOptions(

app/code/Magento/Bundle/Test/Unit/Model/Product/PriceTest.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class PriceTest extends \PHPUnit_Framework_TestCase
6262
protected function setUp()
6363
{
6464
$this->ruleFactoryMock = $this->getMock(
65-
'\Magento\CatalogRule\Model\Resource\RuleFactory',
66-
[],
65+
'Magento\CatalogRule\Model\Resource\RuleFactory',
66+
['create'],
6767
[],
6868
'',
6969
false
@@ -77,8 +77,20 @@ protected function setUp()
7777
$this->priceCurrency = $this->getMockBuilder('Magento\Framework\Pricing\PriceCurrencyInterface')->getMock();
7878
$this->groupManagement = $this->getMockBuilder('Magento\Customer\Api\GroupManagementInterface')
7979
->getMockForAbstractClass();
80-
$gpFactory = $this->getMock('Magento\Catalog\Api\Data\ProductGroupPriceInterfaceFactory', [], [], '', false);
81-
$tpFactory = $this->getMock('Magento\Catalog\Api\Data\ProductTierPriceInterfaceFactory', [], [], '', false);
80+
$gpFactory = $this->getMock(
81+
'Magento\Catalog\Api\Data\ProductGroupPriceInterfaceFactory',
82+
['create'],
83+
[],
84+
'',
85+
false
86+
);
87+
$tpFactory = $this->getMock(
88+
'Magento\Catalog\Api\Data\ProductTierPriceInterfaceFactory',
89+
['create'],
90+
[],
91+
'',
92+
false
93+
);
8294
$scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface');
8395

8496
$objectManagerHelper = new ObjectManagerHelper($this);

app/code/Magento/Bundle/Test/Unit/Model/Product/TypeTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ protected function setUp()
105105
->disableOriginalConstructor()
106106
->getMockForAbstractClass();
107107
$this->bundleModelSelection = $this->getMockBuilder('Magento\Bundle\Model\SelectionFactory')
108+
->setMethods(['create'])
108109
->disableOriginalConstructor()
109110
->getMock();
110111
$this->bundleFactory = $this->getMockBuilder('\Magento\Bundle\Model\Resource\BundleFactory')
112+
->setMethods(['create'])
111113
->disableOriginalConstructor()
112114
->getMock();
113115
$objectHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);

app/code/Magento/Captcha/Test/Unit/Helper/DataTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testGetCaptcha()
7171
new \Magento\Captcha\Model\DefaultModel(
7272
$this->getMock('Magento\Framework\Session\SessionManager', [], [], '', false),
7373
$this->getMock('Magento\Captcha\Helper\Data', [], [], '', false),
74-
$this->getMock('Magento\Captcha\Model\Resource\LogFactory', [], [], '', false),
74+
$this->getMock('Magento\Captcha\Model\Resource\LogFactory', ['create'], [], '', false),
7575
'user_create'
7676
)
7777
)

app/code/Magento/Captcha/Test/Unit/Model/CronTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function setUp()
6969
);
7070

7171
$this->_model = new \Magento\Captcha\Model\Cron(
72-
$this->getMock('Magento\Captcha\Model\Resource\LogFactory', [], [], '', false),
72+
$this->getMock('Magento\Captcha\Model\Resource\LogFactory', ['create'], [], '', false),
7373
$this->_helper,
7474
$this->_adminHelper,
7575
$this->_filesystem,

app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Category/Edit/FormTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function setUp()
8282
);
8383
$this->categoryFactoryMock = $this->getMock(
8484
'Magento\Catalog\Model\CategoryFactory',
85-
[],
85+
['create'],
8686
[],
8787
'',
8888
false

app/code/Magento/Catalog/Test/Unit/Block/Product/View/OptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testGetOptionHtml()
5959

6060
$optValFactoryMock = $this->getMock(
6161
'Magento\Catalog\Model\Product\Option\ValueFactory',
62-
[],
62+
['create'],
6363
[],
6464
'',
6565
false

0 commit comments

Comments
 (0)