@@ -88,7 +88,7 @@ |
||
88 | 88 | array('2.0.0', '2.0.0', false), |
89 | 89 | array('2.0.0', '1.9.9', false), |
90 | 90 | array('1.9.9', '2.0.0', true), |
91 | - array('2.0.0', '2.1.0-alpha1', true), // Should be true because no stable package available |
|
91 | + array('2.0.0', '2.1.0-alpha1', true), // Should be true because no stable package available |
|
92 | 92 | array('2.0.0', '2.1.0-alpha1', false, true), // Should be false because of minimum stability |
93 | 93 | array('2.0.0-alpha1', '2.1.0-alpha2', true), |
94 | 94 | ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | // Remove not stable packages if unwanted |
43 | 43 | if (true === $rootPackage->getPreferStable()) { |
44 | - $higherPackages = array_filter($higherPackages, function (PackageInterface $package) { |
|
44 | + $higherPackages = array_filter($higherPackages, function(PackageInterface $package) { |
|
45 | 45 | return 'stable' === $package->getStability(); |
46 | 46 | }); |
47 | 47 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | // We got higher packages! Let's push it. |
50 | 50 | if (\count($higherPackages) > 0) { |
51 | 51 | // Sort packages by highest version to lowest |
52 | - usort($higherPackages, function (PackageInterface $p1, PackageInterface $p2) { |
|
52 | + usort($higherPackages, function(PackageInterface $p1, PackageInterface $p2) { |
|
53 | 53 | return Comparator::compare($p1->getVersion(), '<', $p2->getVersion()); |
54 | 54 | }); |
55 | 55 |
@@ -256,6 +256,9 @@ |
||
256 | 256 | $addPluginReflection->invoke($this->composer->getPluginManager(), $plugin); |
257 | 257 | } |
258 | 258 | |
259 | + /** |
|
260 | + * @param string $expectedOutput |
|
261 | + */ |
|
259 | 262 | private function assertSameOutput($expectedOutput, $message = '') |
260 | 263 | { |
261 | 264 | $this->assertSame($expectedOutput, $this->io->getOutput(), $message); |
@@ -5,6 +5,10 @@ |
||
5 | 5 | // PHPUnit >=6 Backward Compatibility |
6 | 6 | if (class_exists('\PHPUnit\Framework\TestCase')) { |
7 | 7 | abstract class TestCase extends \PHPUnit\Framework\TestCase { |
8 | + |
|
9 | + /** |
|
10 | + * @param string $class |
|
11 | + */ |
|
8 | 12 | public function getMock($class) { |
9 | 13 | return $this->getMockBuilder($class)->getMock(); |
10 | 14 | } |
@@ -4,11 +4,11 @@ |
||
4 | 4 | |
5 | 5 | // PHPUnit >=6 Backward Compatibility |
6 | 6 | if (class_exists('\PHPUnit\Framework\TestCase')) { |
7 | - abstract class TestCase extends \PHPUnit\Framework\TestCase { |
|
7 | + abstract class TestCase extends \PHPUnit\Framework\TestCase { |
|
8 | 8 | public function getMock($class) { |
9 | - return $this->getMockBuilder($class)->getMock(); |
|
9 | + return $this->getMockBuilder($class)->getMock(); |
|
10 | + } |
|
10 | 11 | } |
11 | - } |
|
12 | 12 | } else { |
13 | - abstract class TestCase extends \PHPUnit_Framework_TestCase {} |
|
13 | + abstract class TestCase extends \PHPUnit_Framework_TestCase {} |
|
14 | 14 | } |