Skip to content

Commit 526da66

Browse files
authored
Merge pull request #24 from magento-gl/phpunit10
AC-12136: PHPUnit 10 upgrade changes for Magento Composer Repo
2 parents 3941875 + fdcb73d commit 526da66

File tree

4 files changed

+14
-17
lines changed

4 files changed

+14
-17
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"symfony/console": "~4.4.0||~5.4.0||~6.4.0"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "^9"
16+
"phpunit/phpunit": "^9 || ^10"
1717
},
1818
"autoload": {
1919
"psr-4": {

phpunit.xml.dist

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
54
backupGlobals="false"
65
colors="true"
7-
bootstrap="vendor/autoload.php"
8-
>
6+
bootstrap="vendor/autoload.php">
97
<php>
10-
<ini name="error_reporting" value="-1" />
8+
<ini name="error_reporting" value="-1"/>
119
</php>
12-
1310
<testsuites>
1411
<testsuite name="Magento Composer Library Test">
1512
<directory>./tests/</directory>
1613
</testsuite>
1714
</testsuites>
18-
19-
<filter>
20-
<whitelist>
15+
<source>
16+
<include>
2117
<directory>./</directory>
22-
<exclude>
23-
<directory>./tests</directory>
24-
</exclude>
25-
</whitelist>
26-
</filter>
18+
</include>
19+
<exclude>
20+
<directory>./tests</directory>
21+
</exclude>
22+
</source>
2723
</phpunit>

tests/Composer/InfoCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testRunInstalled()
7474
*
7575
* @return array
7676
*/
77-
public function getCommandOutputDataProvider()
77+
public static function getCommandOutputDataProvider()
7878
{
7979
return [
8080
'Package not installed' => [

tests/Composer/MagentoComposerApplicationTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class MagentoComposerApplicationTest extends \PHPUnit\Framework\TestCase
3434

3535
protected function setUp(): void
3636
{
37-
$this->composerApplication = $this->createMock(\Composer\Console\Application::class);
37+
$this->composerApplication = $this->getMockBuilder('Composer\Console\Application')
38+
->getMock();
3839
$this->inputFactory = $this->createMock(\Magento\Composer\ConsoleArrayInputFactory::class);
3940
$this->consoleOutput = $this->createMock(\Symfony\Component\Console\Output\BufferedOutput::class);
4041

0 commit comments

Comments
 (0)