Skip to content

Commit 4d23664

Browse files
committed
Merge branch '2.3-develop' into 2.3-tests-pr
2 parents 3ecb2b8 + f77ac3c commit 4d23664

File tree

23 files changed

+789
-224
lines changed

23 files changed

+789
-224
lines changed

app/code/Magento/AdminNotification/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"magento/module-backend": "*",
1212
"magento/module-media-storage": "*",
1313
"magento/module-store": "*",
14-
"magento/module-ui": "*"
14+
"magento/module-ui": "*",
15+
"magento/module-config": "*"
1516
},
1617
"type": "magento2-module",
1718
"license": [

app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function getLoadTreeUrl($expanded = null)
253253
*/
254254
public function getNodesUrl()
255255
{
256-
return $this->getUrl('catalog/category/jsonTree');
256+
return $this->getUrl('catalog/category/tree');
257257
}
258258

259259
/**

app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Magento\Store\Model\Store;
99

1010
/**
11-
* Grid.
11+
* Catalog product grid
1212
*
1313
* @api
1414
* @since 100.0.2
@@ -87,9 +87,7 @@ public function __construct(
8787
}
8888

8989
/**
90-
* Construct.
91-
*
92-
* @return void
90+
* @inheritDoc
9391
*/
9492
protected function _construct()
9593
{
@@ -106,6 +104,7 @@ protected function _construct()
106104
* Get store.
107105
*
108106
* @return Store
107+
* @throws \Magento\Framework\Exception\NoSuchEntityException
109108
*/
110109
protected function _getStore()
111110
{
@@ -115,8 +114,6 @@ protected function _getStore()
115114

116115
/**
117116
* @inheritDoc
118-
*
119-
* @return $this
120117
*/
121118
protected function _prepareCollection()
122119
{
@@ -195,9 +192,6 @@ protected function _prepareCollection()
195192

196193
/**
197194
* @inheritDoc
198-
*
199-
* @param \Magento\Backend\Block\Widget\Grid\Column $column
200-
* @return $this
201195
*/
202196
protected function _addColumnFilterToCollection($column)
203197
{
@@ -218,9 +212,8 @@ protected function _addColumnFilterToCollection($column)
218212

219213
/**
220214
* @inheritDoc
221-
*
222-
* @return $this
223215
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
216+
* @throws \Exception
224217
*/
225218
protected function _prepareColumns()
226219
{
@@ -375,18 +368,11 @@ protected function _prepareColumns()
375368
]
376369
);
377370

378-
$block = $this->getLayout()->getBlock('grid.bottom.links');
379-
if ($block) {
380-
$this->setChild('grid.bottom.links', $block);
381-
}
382-
383371
return parent::_prepareColumns();
384372
}
385373

386374
/**
387375
* @inheritDoc
388-
*
389-
* @return $this
390376
*/
391377
protected function _prepareMassaction()
392378
{
@@ -438,20 +424,15 @@ protected function _prepareMassaction()
438424
}
439425

440426
/**
441-
* Get grid Url.
442-
*
443-
* @return string
427+
* @inheritDoc
444428
*/
445429
public function getGridUrl()
446430
{
447431
return $this->getUrl('catalog/*/grid', ['_current' => true]);
448432
}
449433

450434
/**
451-
* Get row url.
452-
*
453-
* @param \Magento\Catalog\Model\Product|\Magento\Framework\DataObject $row
454-
* @return string
435+
* @inheritDoc
455436
*/
456437
public function getRowUrl($row)
457438
{

app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grid.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
99
<update handle="formkey"/>
1010
<container name="root" label="Root">
11-
<block class="Magento\Catalog\Block\Adminhtml\Product\Grid" name="admin.product.grid"/>
11+
<block class="Magento\Catalog\Block\Adminhtml\Product\Grid" name="admin.product.grid">
12+
<block class="Magento\Framework\View\Element\Text\ListText" name="grid.bottom.links"/>
13+
</block>
1214
</container>
1315
</layout>

app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66

77
namespace Magento\Checkout\Controller\Onepage;
88

9+
use Magento\Framework\App\Action\HttpPostActionInterface;
910
use Magento\Framework\DataObject;
1011
use Magento\Framework\Exception\PaymentException;
1112

12-
class SaveOrder extends \Magento\Checkout\Controller\Onepage
13+
/**
14+
* One Page Checkout saveOrder action
15+
*/
16+
class SaveOrder extends \Magento\Checkout\Controller\Onepage implements HttpPostActionInterface
1317
{
1418
/**
1519
* Create order action
@@ -31,7 +35,7 @@ public function execute()
3135
$result = new DataObject();
3236
try {
3337
$agreementsValidator = $this->_objectManager->get(
34-
\Magento\CheckoutAgreements\Model\AgreementsValidator::class
38+
\Magento\Checkout\Api\AgreementsValidatorInterface::class
3539
);
3640
if (!$agreementsValidator->isValid(array_keys($this->getRequest()->getPost('agreement', [])))) {
3741
$result->setData('success', false);

app/code/Magento/Customer/Block/Account/Dashboard.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,13 @@ public function getAddressEditUrl($address)
114114
* Retrieve the Url for customer orders.
115115
*
116116
* @return string
117+
* @deprecated Action does not exist
117118
*/
118119
public function getOrdersUrl()
119120
{
120-
return $this->_urlBuilder->getUrl('customer/order/index', ['_secure' => true]);
121+
//phpcs:ignore Magento2.Functions.DiscouragedFunction
122+
trigger_error('Method is deprecated', E_USER_DEPRECATED);
123+
return '';
121124
}
122125

123126
/**
@@ -137,7 +140,7 @@ public function getReviewsUrl()
137140
*/
138141
public function getWishlistUrl()
139142
{
140-
return $this->_urlBuilder->getUrl('customer/wishlist/index', ['_secure' => true]);
143+
return $this->_urlBuilder->getUrl('wishlist/index', ['_secure' => true]);
141144
}
142145

143146
/**

app/code/Magento/Directory/Block/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function __construct(
7777
*/
7878
public function getLoadrRegionUrl()
7979
{
80-
return $this->getUrl('directory/json/childRegion');
80+
return $this->getUrl('directory/json/countryRegion');
8181
}
8282

8383
/**

app/code/Magento/Paypal/Model/Payflow/Service/Request/SecureToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function requestToken(Quote $quote)
6969
$request->setSecuretokenid($this->mathRandom->getUniqueHash());
7070
$request->setReturnurl($this->url->getUrl('paypal/transparent/response'));
7171
$request->setErrorurl($this->url->getUrl('paypal/transparent/response'));
72-
$request->setCancelurl($this->url->getUrl('paypal/transparent/cancel'));
72+
$request->setCancelurl($this->url->getUrl('paypal/transparent/response'));
7373
$request->setDisablereceipt('TRUE');
7474
$request->setSilenttran('TRUE');
7575

app/code/Magento/Review/Block/Adminhtml/Rss.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* Class Rss
12+
*
1213
* @package Magento\Catalog\Block\Adminhtml\Rss
1314
*/
1415
class Rss extends \Magento\Backend\Block\AbstractBlock implements DataProviderInterface
@@ -41,26 +42,28 @@ public function __construct(
4142
}
4243

4344
/**
44-
* {@inheritdoc}
45+
* @inheritDoc
4546
*/
4647
public function getRssData()
4748
{
48-
$newUrl = $this->getUrl('rss/catalog/review', ['_secure' => true, '_nosecret' => true]);
4949
$title = __('Pending product review(s)');
5050

51-
$data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8'];
51+
$data = ['title' => $title, 'description' => $title, 'link' => '', 'charset' => 'UTF-8'];
5252

5353
foreach ($this->rssModel->getProductCollection() as $item) {
5454
if ($item->getStoreId()) {
5555
$this->_urlBuilder->setScope($item->getStoreId());
5656
}
5757

5858
$url = $this->getUrl('catalog/product/view', ['id' => $item->getId()]);
59-
$reviewUrl = $this->getUrl('review/product/edit/', [
60-
'id' => $item->getReviewId(),
61-
'_secure' => true,
62-
'_nosecret' => true
63-
]);
59+
$reviewUrl = $this->getUrl(
60+
'review/product/edit/',
61+
[
62+
'id' => $item->getReviewId(),
63+
'_secure' => true,
64+
'_nosecret' => true
65+
]
66+
);
6467

6568
$storeName = $this->storeManager->getStore($item->getStoreId())->getName();
6669
$description = '<p>' . __('Product: <a href="%1" target="_blank">%2</a> <br/>', $url, $item->getName())
@@ -80,31 +83,31 @@ public function getRssData()
8083
}
8184

8285
/**
83-
* {@inheritdoc}
86+
* @inheritDoc
8487
*/
8588
public function getCacheLifetime()
8689
{
8790
return 0;
8891
}
8992

9093
/**
91-
* {@inheritdoc}
94+
* @inheritDoc
9295
*/
9396
public function isAllowed()
9497
{
9598
return true;
9699
}
97100

98101
/**
99-
* {@inheritdoc}
102+
* @inheritDoc
100103
*/
101104
public function getFeeds()
102105
{
103106
return [];
104107
}
105108

106109
/**
107-
* {@inheritdoc}
110+
* @inheritDoc
108111
*/
109112
public function isAuthRequired()
110113
{

app/code/Magento/Review/Test/Unit/Block/Adminhtml/RssTest.php

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1010

11+
/**
12+
* Test RSS adminhtml block
13+
*/
1114
class RssTest extends \PHPUnit\Framework\TestCase
1215
{
1316
/**
@@ -35,6 +38,9 @@ class RssTest extends \PHPUnit\Framework\TestCase
3538
*/
3639
protected $urlBuilder;
3740

41+
/**
42+
* @inheritDoc
43+
*/
3844
protected function setUp()
3945
{
4046
$this->storeManagerInterface = $this->createMock(\Magento\Store\Model\StoreManagerInterface::class);
@@ -51,18 +57,22 @@ protected function setUp()
5157
);
5258
}
5359

60+
/**
61+
* @return void
62+
*/
5463
public function testGetRssData()
5564
{
65+
$rssUrl = '';
5666
$rssData = [
5767
'title' => 'Pending product review(s)',
5868
'description' => 'Pending product review(s)',
59-
'link' => 'http://rss.magento.com',
69+
'link' => $rssUrl,
6070
'charset' => 'UTF-8',
6171
'entries' => [
6272
'title' => 'Product: "Product Name" reviewed by: Product Nick',
6373
'link' => 'http://product.magento.com',
6474
'description' => [
65-
'rss_url' => 'http://rss.magento.com',
75+
'rss_url' => $rssUrl,
6676
'name' => 'Product Name',
6777
'summary' => 'Product Title',
6878
'review' => 'Product Detail',
@@ -71,8 +81,9 @@ public function testGetRssData()
7181
],
7282
],
7383
];
74-
$rssUrl = 'http://rss.magento.com';
75-
$productModel = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\Product::class, [
84+
$productModel = $this->createPartialMock(
85+
\Magento\Catalog\Model\ResourceModel\Product::class,
86+
[
7687
'getStoreId',
7788
'getId',
7889
'getReviewId',
@@ -81,7 +92,8 @@ public function testGetRssData()
8192
'getTitle',
8293
'getNickname',
8394
'getProductUrl'
84-
]);
95+
]
96+
);
8597
$storeModel = $this->createMock(\Magento\Store\Model\Store::class);
8698
$this->storeManagerInterface->expects($this->once())->method('getStore')->will($this->returnValue($storeModel));
8799
$storeModel->expects($this->once())->method('getName')
@@ -118,16 +130,25 @@ public function testGetRssData()
118130
$this->assertContains($rssData['entries']['description']['store'], $data['entries'][0]['description']);
119131
}
120132

133+
/**
134+
* @return void
135+
*/
121136
public function testGetCacheLifetime()
122137
{
123138
$this->assertEquals(0, $this->block->getCacheLifetime());
124139
}
125140

141+
/**
142+
* @return void
143+
*/
126144
public function testIsAllowed()
127145
{
128146
$this->assertEquals(true, $this->block->isAllowed());
129147
}
130148

149+
/**
150+
* @return void
151+
*/
131152
public function testGetFeeds()
132153
{
133154
$this->assertEquals([], $this->block->getFeeds());

0 commit comments

Comments
 (0)