Skip to content

Commit 38fdaa5

Browse files
authored
Merge pull request #12 from magento/1.3.0
Merge 1.3.0 - Add PHP 7.2 support
2 parents 130753a + 15a4eb8 commit 38fdaa5

File tree

5 files changed

+16
-27
lines changed

5 files changed

+16
-27
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
"name": "magento/composer",
33
"description": "Magento composer library helps to instantiate Composer application and run composer commands.",
44
"type": "library",
5-
"version": "1.2.0",
5+
"version": "1.3.0",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"
99
],
1010
"require": {
11-
"php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0",
12-
"composer/composer": "1.4.1",
13-
"symfony/console": "~2.3, !=2.7.0"
11+
"php": "~7.1.3|~7.2.0",
12+
"composer/composer": "^1.6",
13+
"symfony/console": "~4.0.0"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "4.1.0"
16+
"phpunit/phpunit": "~7.0.0"
1717
},
1818
"autoload": {
1919
"psr-4": {

tests/Composer/ConsoleArrayInputFactoryTest.php

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

77
use Magento\Composer\ConsoleArrayInputFactory;
88

9-
class ConsoleArrayInputFactoryTest extends PHPUnit_Framework_TestCase
9+
class ConsoleArrayInputFactoryTest extends \PHPUnit\Framework\TestCase
1010
{
1111

1212
/**
@@ -21,6 +21,6 @@ protected function setUp()
2121

2222
public function testCreate()
2323
{
24-
$this->assertInstanceOf('\Symfony\Component\Console\Input\ArrayInput', $this->factory->create([]));
24+
$this->assertInstanceOf(\Symfony\Component\Console\Input\ArrayInput::class, $this->factory->create([]));
2525
}
2626
}

tests/Composer/InfoCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Magento\Composer\MagentoComposerApplication;
88
use Magento\Composer\InfoCommand;
99

10-
class InfoCommandTest extends PHPUnit_Framework_TestCase
10+
class InfoCommandTest extends \PHPUnit\Framework\TestCase
1111
{
1212

1313
private $installedOutput = 'name : 3rdp/a
@@ -33,7 +33,7 @@ class InfoCommandTest extends PHPUnit_Framework_TestCase
3333

3434
protected function setUp()
3535
{
36-
$this->application = $this->getMock('Magento\Composer\MagentoComposerApplication', [], [], '', false, false);
36+
$this->application = $this->createMock(\Magento\Composer\MagentoComposerApplication::class);
3737

3838
$this->infoCommand = new InfoCommand($this->application);
3939
}

tests/Composer/MagentoComposerApplicationTest.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Composer\ConsoleArrayInputFactory;
1010
use Symfony\Component\Console\Output\BufferedOutput;
1111

12-
class MagentoComposerApplicationTest extends PHPUnit_Framework_TestCase
12+
class MagentoComposerApplicationTest extends \PHPUnit\Framework\TestCase
1313
{
1414
/**
1515
* @var MagentoComposerApplication
@@ -33,20 +33,9 @@ class MagentoComposerApplicationTest extends PHPUnit_Framework_TestCase
3333

3434
protected function setUp()
3535
{
36-
$this->composerApplication = $this->getMock(
37-
'Composer\Console\Application',
38-
[
39-
'resetComposer',
40-
'create',
41-
'run'
42-
],
43-
[],
44-
'',
45-
false,
46-
false
47-
);
48-
$this->inputFactory = $this->getMock('Magento\Composer\ConsoleArrayInputFactory', [], [], '', false);
49-
$this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\BufferedOutput', [], [], '', false);
36+
$this->composerApplication = $this->createMock(\Composer\Console\Application::class);
37+
$this->inputFactory = $this->createMock(\Magento\Composer\ConsoleArrayInputFactory::class);
38+
$this->consoleOutput = $this->createMock(\Symfony\Component\Console\Output\BufferedOutput::class);
5039

5140
$this->application = new MagentoComposerApplication(
5241
'path1',

tests/Composer/RequireUpdateDryRunCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Magento\Composer\InfoCommand;
99
use Magento\Composer\RequireUpdateDryRunCommand;
1010

11-
class RequireUpdateDryRunCommandTest extends PHPUnit_Framework_TestCase
11+
class RequireUpdateDryRunCommandTest extends \PHPUnit\Framework\TestCase
1212
{
1313
/**
1414
* @var MagentoComposerApplication|\PHPUnit_Framework_MockObject_MockObject
@@ -64,8 +64,8 @@ class RequireUpdateDryRunCommandTest extends PHPUnit_Framework_TestCase
6464

6565
protected function setUp()
6666
{
67-
$this->application = $this->getMock('Magento\Composer\MagentoComposerApplication', [], [], '', false, false);
68-
$this->infoCommand = $this->getMock('Magento\Composer\InfoCommand', [], [], '', false, false);
67+
$this->application = $this->createMock(\Magento\Composer\MagentoComposerApplication::class);
68+
$this->infoCommand = $this->createMock(\Magento\Composer\InfoCommand::class);
6969

7070
$this->requireUpdateDryRunCommand = new RequireUpdateDryRunCommand(
7171
$this->application,

0 commit comments

Comments
 (0)