Skip to content
Snippets Groups Projects
Commit 7baa3e07 authored by Ivan Gavryshko's avatar Ivan Gavryshko
Browse files

MAGETWO-50181: Vulnerable package found (composer/composer (1.0.0-alpha10))

- fixed unittests
parent d029eced
Branches
No related merge requests found
......@@ -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
......
......@@ -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())
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment