From 7baa3e0728b8bdbae9abcd12079f8ccf8826ce13 Mon Sep 17 00:00:00 2001 From: Ivan Gavryshko <igavryshko@ebay.com> Date: Wed, 9 Mar 2016 21:55:29 -0600 Subject: [PATCH] MAGETWO-50181: Vulnerable package found (composer/composer (1.0.0-alpha10)) - fixed unittests --- .../Test/Unit/Model/PhpReadinessCheckTest.php | 16 ++++++++-------- .../Setup/Test/Unit/Model/SystemPackageTest.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php index 3c24f18df77..7d582337c77 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php @@ -57,7 +57,7 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase { $this->composerInfo->expects($this->once())->method('getRequiredPhpVersion')->willReturn('1.0'); $multipleConstraints = $this->getMockForAbstractClass( - 'Composer\Package\LinkConstraint\LinkConstraintInterface', + 'Composer\Semver\Constraint\ConstraintInterface', [], '', false @@ -68,7 +68,7 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase ->willThrowException(new \UnexpectedValueException()); $this->versionParser->expects($this->at(2))->method('normalize')->willReturn('1.0'); $currentPhpVersion = $this->getMockForAbstractClass( - 'Composer\Package\LinkConstraint\LinkConstraintInterface', + 'Composer\Semver\Constraint\ConstraintInterface', [], '', false @@ -89,7 +89,7 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase { $this->composerInfo->expects($this->once())->method('getRequiredPhpVersion')->willReturn('1.0'); $multipleConstraints = $this->getMockForAbstractClass( - 'Composer\Package\LinkConstraint\LinkConstraintInterface', + 'Composer\Semver\Constraint\ConstraintInterface', [], '', false @@ -100,7 +100,7 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase ->willThrowException(new \UnexpectedValueException()); $this->versionParser->expects($this->at(2))->method('normalize')->willReturn('1.0'); $currentPhpVersion = $this->getMockForAbstractClass( - 'Composer\Package\LinkConstraint\LinkConstraintInterface', + 'Composer\Semver\Constraint\ConstraintInterface', [], '', false @@ -120,7 +120,7 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase private function setUpNoPrettyVersionParser() { $multipleConstraints = $this->getMockForAbstractClass( - 'Composer\Package\LinkConstraint\LinkConstraintInterface', + 'Composer\Semver\Constraint\ConstraintInterface', [], '', false @@ -128,7 +128,7 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase $this->versionParser->expects($this->at(0))->method('parseConstraints')->willReturn($multipleConstraints); $this->versionParser->expects($this->at(1))->method('normalize')->willReturn('1.0'); $currentPhpVersion = $this->getMockForAbstractClass( - 'Composer\Package\LinkConstraint\LinkConstraintInterface', + 'Composer\Semver\Constraint\ConstraintInterface', [], '', false @@ -156,7 +156,7 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase { $this->composerInfo->expects($this->once())->method('getRequiredPhpVersion')->willReturn('1.0'); $multipleConstraints = $this->getMockForAbstractClass( - 'Composer\Package\LinkConstraint\LinkConstraintInterface', + 'Composer\Semver\Constraint\ConstraintInterface', [], '', false @@ -164,7 +164,7 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase $this->versionParser->expects($this->at(0))->method('parseConstraints')->willReturn($multipleConstraints); $this->versionParser->expects($this->at(1))->method('normalize')->willReturn('1.0'); $currentPhpVersion = $this->getMockForAbstractClass( - 'Composer\Package\LinkConstraint\LinkConstraintInterface', + 'Composer\Semver\Constraint\ConstraintInterface', [], '', false diff --git a/setup/src/Magento/Setup/Test/Unit/Model/SystemPackageTest.php b/setup/src/Magento/Setup/Test/Unit/Model/SystemPackageTest.php index 9ce62451168..7793f89a9c6 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/SystemPackageTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/SystemPackageTest.php @@ -263,7 +263,7 @@ class SystemPackageTest extends \PHPUnit_Framework_TestCase ->with('magento/product-enterprise-edition') ->willReturn(['available_versions' => ['1.0.0', '1.0.1', '1.0.2']]); $require = $this->getMock('\Composer\Package\Link', [], [], '', false); - $constraintMock = $this->getMock('\Composer\Package\LinkConstraint\VersionConstraint', [], [], '', false); + $constraintMock = $this->getMock('\Composer\Semver\Constraint\Constraint', [], [], '', false); $constraintMock->expects($this->any())->method('getPrettyString') ->willReturn('1.0.1'); $require->expects($this->any()) -- GitLab