Skip to content

Commit 67ee5ff

Browse files
authored
Merge pull request #7466 from magento-atwix-pyrrans/AC-2426-fix-default-gateway-url
[Pyrrans] Delivery bunch from 02/23/2022 (AC-2426, AC-2428)
2 parents 0d67512 + 2e65fb8 commit 67ee5ff

File tree

4 files changed

+157
-66
lines changed

4 files changed

+157
-66
lines changed

app/code/Magento/Usps/Model/Carrier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
9999
*
100100
* @var string
101101
*/
102-
protected $_defaultGatewayUrl = 'http://production.shippingapis.com/ShippingAPI.dll';
102+
protected $_defaultGatewayUrl = 'https://production.shippingapis.com/ShippingAPI.dll';
103103

104104
/**
105105
* Container types that could be customized for USPS carrier

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Profiler/OutputBambooTestFilter.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
/**
89
* Stream filter that collect the data that is going through the stream
@@ -11,23 +12,28 @@
1112
*/
1213
namespace Magento\Test\Profiler;
1314

15+
use PHPUnit\Framework\Assert;
16+
1417
class OutputBambooTestFilter extends \php_user_filter
1518
{
19+
/**
20+
* @var string
21+
*/
1622
private static $_collectedData = '';
1723

1824
/**
19-
* Collect intercepted data
25+
* Collect intercepted data.
2026
*
2127
* @param resource $in
2228
* @param resource $out
2329
* @param int $consumed
2430
* @param bool $closing
25-
* @return int
2631
*
32+
* @return int
2733
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2834
* @SuppressWarnings(PHPMD.ShortVariable)
2935
*/
30-
public function filter($in, $out, &$consumed, $closing)
36+
public function filter($in, $out, &$consumed, $closing): int
3137
{
3238
while ($bucket = stream_bucket_make_writeable($in)) {
3339
self::$_collectedData .= $bucket->data;
@@ -37,19 +43,26 @@ public function filter($in, $out, &$consumed, $closing)
3743
return PSFS_PASS_ON;
3844
}
3945

40-
public static function resetCollectedData()
46+
/**
47+
* This method to reset collection data.
48+
*
49+
* @return void
50+
*/
51+
public static function resetCollectedData(): void
4152
{
4253
self::$_collectedData = '';
4354
}
4455

4556
/**
46-
* Assert that collected data matches expected format
57+
* Assert that collected data matches expected format.
4758
*
4859
* @param string $expectedData
60+
*
61+
* @return void
4962
*/
50-
public static function assertCollectedData($expectedData)
63+
public static function assertCollectedData(string $expectedData): void
5164
{
52-
\PHPUnit\Framework\Assert::assertStringMatchesFormat(
65+
Assert::assertStringMatchesFormat(
5366
$expectedData,
5467
self::$_collectedData,
5568
'Expected data went through the stream.'

0 commit comments

Comments
 (0)