Skip to content

Commit f3e4bec

Browse files
authored
Merge pull request #25 from magento-trigger/MC-33066
PHP 7.4 Support
2 parents fe738ac + 7af1aba commit f3e4bec

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"AFL-3.0"
88
],
99
"require": {
10-
"php": "~7.1.3||~7.2.0||~7.3.0",
11-
"composer/composer": "^1.6",
10+
"php": "~7.3.0||~7.4.0",
11+
"composer/composer": "^1.9",
1212
"symfony/console": "~4.4.0"
1313
},
1414
"require-dev": {
15-
"phpunit/phpunit": "~7.0.0"
15+
"phpunit/phpunit": "^9"
1616
},
1717
"autoload": {
1818
"psr-4": {

tests/Composer/ConsoleArrayInputFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ConsoleArrayInputFactoryTest extends \PHPUnit\Framework\TestCase
1414
*/
1515
protected $factory;
1616

17-
protected function setUp()
17+
protected function setUp(): void
1818
{
1919
$this->factory = new ConsoleArrayInputFactory();
2020
}

tests/Composer/InfoCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class InfoCommandTest extends \PHPUnit\Framework\TestCase
3131
*/
3232
protected $infoCommand;
3333

34-
protected function setUp()
34+
protected function setUp(): void
3535
{
3636
$this->application = $this->createMock(\Magento\Composer\MagentoComposerApplication::class);
3737

tests/Composer/MagentoComposerApplicationTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class MagentoComposerApplicationTest extends \PHPUnit\Framework\TestCase
3131
*/
3232
protected $consoleOutput;
3333

34-
protected function setUp()
34+
protected function setUp(): void
3535
{
3636
$this->composerApplication = $this->createMock(\Composer\Console\Application::class);
3737
$this->inputFactory = $this->createMock(\Magento\Composer\ConsoleArrayInputFactory::class);
@@ -46,13 +46,11 @@ protected function setUp()
4646
);
4747
}
4848

49-
/**
50-
* @expectedException \RuntimeException
51-
* @expectedExceptionMessage Command "update" failed
52-
*/
5349
function testWrongExitCode()
5450
{
5551
$this->composerApplication->expects($this->once())->method('run')->willReturn(1);
52+
$this->expectException(\RuntimeException::class);
53+
$this->expectExceptionMessage('Command "update" failed');
5654

5755
$this->application->runComposerCommand(['command'=>'update']);
5856
}

tests/Composer/RequireUpdateDryRunCommandTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class RequireUpdateDryRunCommandTest extends \PHPUnit\Framework\TestCase
6262
]
6363
];
6464

65-
protected function setUp()
65+
protected function setUp(): void
6666
{
6767
$this->application = $this->createMock(\Magento\Composer\MagentoComposerApplication::class);
6868
$this->infoCommand = $this->createMock(\Magento\Composer\InfoCommand::class);
@@ -79,15 +79,12 @@ public function testRun()
7979
$this->requireUpdateDryRunCommand->run([], '');
8080
}
8181

82-
/**
83-
* @expectedException \RuntimeException
84-
* @expectedExceptionMessage
85-
*/
8682
public function testRunException()
8783
{
8884
$this->application->expects($this->at(1))
8985
->method('runComposerCommand')
9086
->willThrowException(new \RuntimeException($this->errorMessage));
87+
$this->expectException(\RuntimeException::class);
9188
$this->infoCommand->expects($this->once())->method('run')->willReturn($this->packageInfo);
9289
$this->requireUpdateDryRunCommand->run(['3rdp/e 1.2.0'], '');
9390
}

0 commit comments

Comments
 (0)