Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 6b8f59c

Browse files
authored
Merge pull request #2811 from magento-borg/MC-2338
Fixed issues: - MC-2338 3rd party library/dependency upgrade for 2.3 pre Alpha
2 parents 113bf62 + 9bcb987 commit 6b8f59c

File tree

36 files changed

+820
-534
lines changed

36 files changed

+820
-534
lines changed

app/code/Magento/Analytics/Test/Unit/ReportXml/DB/ReportValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ protected function setUp()
7979
* @dataProvider errorDataProvider
8080
* @param string $reportName
8181
* @param array $result
82-
* @param \PHPUnit_Framework_MockObject_Stub $queryReturnStub
82+
* @param \PHPUnit\Framework\MockObject\Stub $queryReturnStub
8383
*/
84-
public function testValidate($reportName, $result, \PHPUnit_Framework_MockObject_Stub $queryReturnStub)
84+
public function testValidate($reportName, $result, \PHPUnit\Framework\MockObject\Stub $queryReturnStub)
8585
{
8686
$connectionName = 'testConnection';
8787
$this->queryFactoryMock->expects($this->once())

app/code/Magento/Checkout/Test/Unit/Controller/Index/IndexTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
use Magento\Customer\Model\Session;
1111
use Magento\Framework\App\Request\Http;
1212
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
13-
use PHPUnit_Framework_MockObject_Builder_InvocationMocker as InvocationMocker;
14-
use PHPUnit_Framework_MockObject_Matcher_InvokedCount as InvokedCount;
13+
use PHPUnit\Framework\MockObject\Builder\InvocationMocker as InvocationMocker;
14+
use PHPUnit\Framework\MockObject\Matcher\InvokedCount as InvokedCount;
1515
use PHPUnit_Framework_MockObject_MockObject as MockObject;
1616
use Magento\Checkout\Helper\Data;
1717
use Magento\Quote\Model\Quote;

app/code/Magento/Config/Test/Unit/Console/Command/ConfigShow/ValueProcessorTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ protected function setUp()
7373

7474
/**
7575
* @param bool $hasBackendModel
76-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsGetBackendModel
77-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsCreate
78-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsGetValue
79-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetPath
80-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetScope
81-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetScopeId
82-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetValue
83-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsAfterLoad
84-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSerialize
76+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsGetBackendModel
77+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsCreate
78+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsGetValue
79+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetPath
80+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetScope
81+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetScopeId
82+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetValue
83+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsAfterLoad
84+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSerialize
8585
* @param string $expectsValue
8686
* @param string $className
8787
* @param string $value

app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibilityCompositeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public function testException()
5151
}
5252

5353
/**
54-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $firstExpects
54+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $firstExpects
5555
* @param bool $firstResult
56-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $secondExpects
56+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $secondExpects
5757
* @param bool $secondResult
5858
* @param bool $expectedResult
5959
* @dataProvider visibilityDataProvider
@@ -74,9 +74,9 @@ public function testDisabled($firstExpects, $firstResult, $secondExpects, $secon
7474
}
7575

7676
/**
77-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $firstExpects
77+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $firstExpects
7878
* @param bool $firstResult
79-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $secondExpects
79+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $secondExpects
8080
* @param bool $secondResult
8181
* @param bool $expectedResult
8282
* @dataProvider visibilityDataProvider

app/code/Magento/Developer/Test/Unit/Console/Command/DevTestsRunCommandTest.php

Lines changed: 86 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,101 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
namespace Magento\Developer\Test\Unit\Console\Command;
7+
// @codingStandardsIgnoreStart
88

9-
use Magento\Developer\Console\Command\DevTestsRunCommand;
10-
use Symfony\Component\Console\Tester\CommandTester;
9+
namespace Magento\Developer\Console\Command {
10+
use Symfony\Component\Console\Tester\CommandTester;
1111

12-
/**
13-
* Class DevTestsRunCommandTest
14-
*
15-
* Tests dev:tests:run command. Only tests error case because DevTestsRunCommand calls phpunit with
16-
* passthru, so there is no good way to mock out running the tests.
17-
*/
18-
class DevTestsRunCommandTest extends \PHPUnit\Framework\TestCase
19-
{
12+
$devTestsRunCommandTestPassthruReturnVar = null;
2013

2114
/**
22-
* @var DevTestsRunCommand
15+
* Mock for PHP builtin passthtru function
16+
*
17+
* @param string $command
18+
* @param int|null $return_var
19+
* @return void
20+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2321
*/
24-
private $command;
25-
26-
protected function setUp()
22+
function passthru($command, &$return_var = null)
2723
{
28-
$this->command = new DevTestsRunCommand();
24+
global $devTestsRunCommandTestPassthruReturnVar;
25+
$return_var = $devTestsRunCommandTestPassthruReturnVar;
2926
}
3027

31-
public function testExecuteBadType()
28+
/**
29+
* Class DevTestsRunCommandTest
30+
*
31+
* Tests dev:tests:run command. Only tests error case because DevTestsRunCommand calls phpunit with
32+
* passthru, so there is no good way to mock out running the tests.
33+
*/
34+
class DevTestsRunCommandTest extends \PHPUnit\Framework\TestCase
3235
{
33-
$commandTester = new CommandTester($this->command);
34-
$commandTester->execute([DevTestsRunCommand::INPUT_ARG_TYPE => 'bad']);
35-
$this->assertContains('Invalid type: "bad"', $commandTester->getDisplay());
36-
}
3736

38-
public function testPassArgumentsToPHPUnit()
39-
{
40-
$commandTester = new CommandTester($this->command);
41-
$commandTester->execute(
42-
[
43-
DevTestsRunCommand::INPUT_ARG_TYPE => 'unit',
44-
'-' . DevTestsRunCommand::INPUT_OPT_COMMAND_ARGUMENTS_SHORT => '--list-suites',
45-
]
46-
);
47-
$this->assertContains(
48-
'phpunit --list-suites',
49-
$commandTester->getDisplay(),
50-
'Parameters should be passed to PHPUnit'
51-
);
37+
/**
38+
* @var DevTestsRunCommand
39+
*/
40+
private $command;
41+
42+
protected function setUp()
43+
{
44+
$this->command = new DevTestsRunCommand();
45+
}
46+
47+
public function testExecuteBadType()
48+
{
49+
$commandTester = new CommandTester($this->command);
50+
$commandTester->execute([DevTestsRunCommand::INPUT_ARG_TYPE => 'bad']);
51+
$this->assertContains('Invalid type: "bad"', $commandTester->getDisplay());
52+
}
53+
54+
public function testPassArgumentsToPHPUnit()
55+
{
56+
global $devTestsRunCommandTestPassthruReturnVar;
57+
58+
$devTestsRunCommandTestPassthruReturnVar = 0;
59+
60+
$commandTester = new CommandTester($this->command);
61+
$commandTester->execute(
62+
[
63+
DevTestsRunCommand::INPUT_ARG_TYPE => 'unit',
64+
'-' . DevTestsRunCommand::INPUT_OPT_COMMAND_ARGUMENTS_SHORT => '--list-suites',
65+
]
66+
);
67+
$this->assertContains(
68+
'phpunit --list-suites',
69+
$commandTester->getDisplay(),
70+
'Parameters should be passed to PHPUnit'
71+
);
72+
$this->assertContains(
73+
'PASSED (',
74+
$commandTester->getDisplay(),
75+
'PHPUnit runs should have passed'
76+
);
77+
}
78+
79+
public function testPassArgumentsToPHPUnitNegative()
80+
{
81+
global $devTestsRunCommandTestPassthruReturnVar;
82+
83+
$devTestsRunCommandTestPassthruReturnVar = 255;
84+
85+
$commandTester = new CommandTester($this->command);
86+
$commandTester->execute(
87+
[
88+
DevTestsRunCommand::INPUT_ARG_TYPE => 'unit',
89+
'-' . DevTestsRunCommand::INPUT_OPT_COMMAND_ARGUMENTS_SHORT => '--list-suites',
90+
]
91+
);
92+
$this->assertContains(
93+
'phpunit --list-suites',
94+
$commandTester->getDisplay(),
95+
'Parameters should be passed to PHPUnit'
96+
);
97+
$this->assertContains(
98+
'FAILED - ',
99+
$commandTester->getDisplay(),
100+
'PHPUnit runs should have passed'
101+
);
102+
}
52103
}
53104
}

app/code/Magento/Downloadable/Test/Unit/Ui/DataProvider/Product/Form/Modifier/Data/LinksTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ protected function setUp()
9898
/**
9999
* @param int|null $id
100100
* @param string $typeId
101-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectedGetTitle
102-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectedGetValue
101+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectedGetTitle
102+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectedGetValue
103103
* @return void
104104
* @dataProvider getLinksTitleDataProvider
105105
*/

app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
if (isset($methodsForms[$code])) {
8080
$block->setMethodFormTemplate($code, $methodsForms[$code]);
8181
}
82-
?>
82+
?>
8383
<dt class="item-title">
8484
<?php if ($methodsCount > 1) : ?>
8585
<input type="radio"

app/code/Magento/Multishipping/view/frontend/templates/checkout/results.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $orderIds = $block->getOrderIds();
1111
<div class="multicheckout results">
1212
<p class="block-content">
1313
<?php if (!empty($orderIds)) : ?>
14-
<?= $block->escapeHtml(__('Not all items were included.')); ?>
14+
<?= $block->escapeHtml(__('Not all items were included.')); ?>
1515
<?php endif; ?>
1616
<?= $block->escapeHtml(__('For details, see')); ?>
1717
<a href="#failed"><?= $block->escapeHtml(__('Failed to Order')); ?></a>

app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
<?php if ($shippingAddress) : ?>
2525
<span class="shipping-label"><?= $block->escapeHtml(__('Ship to:')); ?></span>
2626
<span class="shipping-address">
27-
<?= $block->escapeHtml(
28-
$block->getCheckoutData()->formatOrderShippingAddress($shippingAddress)
29-
); ?>
27+
<?= $block->escapeHtml(
28+
$block->getCheckoutData()->formatOrderShippingAddress($shippingAddress)
29+
); ?>
3030
</span>
3131
<?php else : ?>
3232
<span class="shipping-address">

app/code/Magento/Persistent/Test/Unit/Observer/CheckExpirePersistentQuoteObserverTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,18 @@ public function testExecuteWhenPersistentIsNotEnabled()
113113
*
114114
* @param string $refererUri
115115
* @param string $requestUri
116-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expireCounter
117-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $dispatchCounter
118-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setCustomerIdCounter
116+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expireCounter
117+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $dispatchCounter
118+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setCustomerIdCounter
119119
* @return void
120120
* @dataProvider requestDataProvider
121121
*/
122122
public function testExecuteWhenPersistentIsEnabled(
123123
string $refererUri,
124124
string $requestUri,
125-
\PHPUnit_Framework_MockObject_Matcher_InvokedCount $expireCounter,
126-
\PHPUnit_Framework_MockObject_Matcher_InvokedCount $dispatchCounter,
127-
\PHPUnit_Framework_MockObject_Matcher_InvokedCount $setCustomerIdCounter
125+
\PHPUnit\Framework\MockObject\Matcher\InvokedCount $expireCounter,
126+
\PHPUnit\Framework\MockObject\Matcher\InvokedCount $dispatchCounter,
127+
\PHPUnit\Framework\MockObject\Matcher\InvokedCount $setCustomerIdCounter
128128
): void {
129129
$this->persistentHelperMock
130130
->expects($this->once())

app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function testCheckIsLive()
202202
* @param int $useAggregatedData
203203
* @param string $mainTable
204204
* @param int $isFilter
205-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getIfNullSqlResult
205+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getIfNullSqlResult
206206
* @dataProvider useAggregatedDataDataProvider
207207
* @return void
208208
*/
@@ -309,7 +309,7 @@ public function testAddItemCountExpr()
309309
* @param int $isFilter
310310
* @param int $useAggregatedData
311311
* @param string $mainTable
312-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getIfNullSqlResult
312+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getIfNullSqlResult
313313
* @dataProvider totalsDataProvider
314314
* @return void
315315
*/

app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Report/Product/ViewedTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ function ($arg) {
190190
/**
191191
* @param mixed $from
192192
* @param mixed $to
193-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $truncateCount
194-
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $deleteCount
193+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $truncateCount
194+
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $deleteCount
195195
* @dataProvider intervalsDataProvider
196196
* @return void
197197
*/

app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public function stepIdentityContainerInit($identityMockClassName)
168168
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendCopyToExpects
169169
*/
170170
protected function stepSend(
171-
\PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendExpects,
172-
\PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendCopyToExpects
171+
\PHPUnit\Framework\MockObject\Matcher\InvokedCount $sendExpects,
172+
\PHPUnit\Framework\MockObject\Matcher\InvokedCount $sendCopyToExpects
173173
) {
174174
$senderMock = $this->createPartialMock(\Magento\Sales\Model\Order\Email\Sender::class, ['send', 'sendCopyTo']);
175175
$senderMock->expects($sendExpects)

app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<?php foreach ($_methods as $_method) :
1818
$_code = $_method->getCode();
1919
$_counter++;
20-
?>
20+
?>
2121
<dt class="admin__field-option">
2222
<?php if ($_methodsCount > 1) : ?>
2323
<input id="p_method_<?= $block->escapeHtml($_code); ?>"

composer.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@
2929
"ext-zip": "*",
3030
"ext-bcmath": "*",
3131
"lib-libxml": "*",
32-
"braintree/braintree_php": "3.28.0",
32+
"braintree/braintree_php": "3.34.0",
3333
"colinmollenhour/cache-backend-file": "~1.4.1",
34-
"colinmollenhour/cache-backend-redis": "1.10.4",
35-
"colinmollenhour/credis": "1.9.1",
36-
"colinmollenhour/php-redis-session-abstract": "~1.3.8",
34+
"colinmollenhour/cache-backend-redis": "1.10.5",
35+
"colinmollenhour/credis": "1.10.0",
36+
"colinmollenhour/php-redis-session-abstract": "~1.4.0",
3737
"composer/composer": "^1.6",
3838
"elasticsearch/elasticsearch": "~2.0|~5.1",
39-
"magento/composer": "~1.3.0",
39+
"magento/composer": "~1.4.0",
4040
"magento/magento-composer-installer": ">=0.1.11",
4141
"magento/zendframework1": "~1.14.0",
4242
"monolog/monolog": "^1.17",
4343
"oyejorge/less.php": "~1.7.0",
4444
"pelago/emogrifier": "^2.0.0",
4545
"php-amqplib/php-amqplib": "~2.7.0",
46-
"phpseclib/mcrypt_compat": "1.0.4",
46+
"phpseclib/mcrypt_compat": "1.0.5",
4747
"phpseclib/phpseclib": "2.0.*",
4848
"ramsey/uuid": "~3.7.3",
49-
"symfony/console": "~4.0.0",
50-
"symfony/event-dispatcher": "~4.0.0",
51-
"symfony/process": "~4.0.0",
49+
"symfony/console": "~4.1.0",
50+
"symfony/event-dispatcher": "~4.1.0",
51+
"symfony/process": "~4.1.0",
5252
"tedivm/jshrink": "~1.3.0",
5353
"tubalmartin/cssmin": "4.1.1",
5454
"webonyx/graphql-php": "^0.11.1",
@@ -81,13 +81,13 @@
8181
"zendframework/zend-view": "~2.10.0"
8282
},
8383
"require-dev": {
84-
"friendsofphp/php-cs-fixer": "~2.10.0",
84+
"friendsofphp/php-cs-fixer": "~2.12.0",
8585
"lusitanian/oauth": "~0.8.10",
8686
"pdepend/pdepend": "2.5.2",
8787
"phpmd/phpmd": "@stable",
88-
"phpunit/phpunit": "~6.2.0",
88+
"phpunit/phpunit": "~6.5.0",
8989
"sebastian/phpcpd": "~3.0.0",
90-
"squizlabs/php_codesniffer": "3.2.2"
90+
"squizlabs/php_codesniffer": "3.3.0"
9191
},
9292
"replace": {
9393
"magento/module-marketplace": "*",

0 commit comments

Comments
 (0)