diff --git a/tests/Constraint/ConstraintTest.php b/tests/Constraint/ConstraintTest.php index b289ea24..1e599133 100644 --- a/tests/Constraint/ConstraintTest.php +++ b/tests/Constraint/ConstraintTest.php @@ -378,18 +378,11 @@ public function testInverseMatchingOtherConstraints() { $constraint = new Constraint('>', '1.0.0'); - $multiConstraint = $this - ->getMockBuilder('Composer\Semver\Constraint\MultiConstraint') - ->disableOriginalConstructor() - ->setMethods(array('matches')) - ->getMock() - ; - - $matchAllConstraint = $this - ->getMockBuilder('Composer\Semver\Constraint\MatchAllConstraint') - ->setMethods(array('matches')) - ->getMock() - ; + $multiConstraint = + $this->createPartialMock('Composer\Semver\Constraint\MultiConstraint', array('matches')); + + $matchAllConstraint = + $this->createPartialMock('Composer\Semver\Constraint\MatchAllConstraint', array('matches')); foreach (array($multiConstraint, $matchAllConstraint) as $mock) { $mock @@ -400,9 +393,7 @@ public function testInverseMatchingOtherConstraints() ; } - // @phpstan-ignore-next-line $this->assertTrue($constraint->matches($multiConstraint)); - // @phpstan-ignore-next-line $this->assertTrue($constraint->matches($matchAllConstraint)); }