Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
@@ -19,7 +19,7 @@ class VersionConstraintParserTest extends TestCase {
|
||||
/**
|
||||
* @dataProvider versionStringProvider
|
||||
*
|
||||
* @param string $versionString
|
||||
* @param string $versionString
|
||||
* @param VersionConstraint $expectedConstraint
|
||||
*/
|
||||
public function testReturnsExpectedConstraint($versionString, VersionConstraint $expectedConstraint) {
|
||||
@@ -109,6 +109,27 @@ class VersionConstraintParserTest extends TestCase {
|
||||
)
|
||||
]
|
||||
)
|
||||
],
|
||||
['7.0.28-1', new ExactVersionConstraint('7.0.28-1')],
|
||||
[
|
||||
'^3.0.0-alpha1',
|
||||
new AndVersionConstraintGroup(
|
||||
'^3.0.0-alpha1',
|
||||
[
|
||||
new GreaterThanOrEqualToVersionConstraint('^3.0.0-alpha1', new Version('3.0.0-alpha1')),
|
||||
new SpecificMajorVersionConstraint('^3.0.0-alpha1', 3)
|
||||
]
|
||||
)
|
||||
],
|
||||
[
|
||||
'^3.0.0-alpha.1',
|
||||
new AndVersionConstraintGroup(
|
||||
'^3.0.0-alpha.1',
|
||||
[
|
||||
new GreaterThanOrEqualToVersionConstraint('^3.0.0-alpha.1', new Version('3.0.0-alpha.1')),
|
||||
new SpecificMajorVersionConstraint('^3.0.0-alpha.1', 3)
|
||||
]
|
||||
)
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -13,11 +13,11 @@ namespace PharIo\Version;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers PharIo\Version\AndVersionConstraintGroup
|
||||
* @covers \PharIo\Version\AndVersionConstraintGroup
|
||||
*/
|
||||
class AndVersionConstraintGroupTest extends TestCase {
|
||||
public function testReturnsFalseIfOneConstraintReturnsFalse() {
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$secondConstraint = $this->createMock(VersionConstraint::class);
|
||||
|
||||
$firstConstraint->expects($this->once())
|
||||
@@ -34,7 +34,7 @@ class AndVersionConstraintGroupTest extends TestCase {
|
||||
}
|
||||
|
||||
public function testReturnsTrueIfAllConstraintsReturnsTrue() {
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$secondConstraint = $this->createMock(VersionConstraint::class);
|
||||
|
||||
$firstConstraint->expects($this->once())
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PharIo\Version;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers PharIo\Version\AnyVersionConstraint
|
||||
* @covers \PharIo\Version\AnyVersionConstraint
|
||||
*/
|
||||
class AnyVersionConstraintTest extends TestCase {
|
||||
public function versionProvider() {
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PharIo\Version;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers PharIo\Version\ExactVersionConstraint
|
||||
* @covers \PharIo\Version\ExactVersionConstraint
|
||||
*/
|
||||
class ExactVersionConstraintTest extends TestCase {
|
||||
public function compliantVersionProvider() {
|
||||
@@ -35,7 +35,7 @@ class ExactVersionConstraintTest extends TestCase {
|
||||
/**
|
||||
* @dataProvider compliantVersionProvider
|
||||
*
|
||||
* @param string $constraintValue
|
||||
* @param string $constraintValue
|
||||
* @param Version $version
|
||||
*/
|
||||
public function testReturnsTrueForCompliantVersion($constraintValue, Version $version) {
|
||||
@@ -47,7 +47,7 @@ class ExactVersionConstraintTest extends TestCase {
|
||||
/**
|
||||
* @dataProvider nonCompliantVersionProvider
|
||||
*
|
||||
* @param string $constraintValue
|
||||
* @param string $constraintValue
|
||||
* @param Version $version
|
||||
*/
|
||||
public function testReturnsFalseForNonCompliantVersion($constraintValue, Version $version) {
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PharIo\Version;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers PharIo\Version\GreaterThanOrEqualToVersionConstraint
|
||||
* @covers \PharIo\Version\GreaterThanOrEqualToVersionConstraint
|
||||
*/
|
||||
class GreaterThanOrEqualToVersionConstraintTest extends TestCase {
|
||||
public function versionProvider() {
|
||||
@@ -37,7 +37,7 @@ class GreaterThanOrEqualToVersionConstraintTest extends TestCase {
|
||||
*
|
||||
* @param Version $constraintVersion
|
||||
* @param Version $version
|
||||
* @param bool $expectedResult
|
||||
* @param bool $expectedResult
|
||||
*/
|
||||
public function testReturnsTrueForCompliantVersions(Version $constraintVersion, Version $version, $expectedResult) {
|
||||
$constraint = new GreaterThanOrEqualToVersionConstraint('foo', $constraintVersion);
|
||||
|
||||
@@ -13,11 +13,11 @@ namespace PharIo\Version;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers PharIo\Version\OrVersionConstraintGroup
|
||||
* @covers \PharIo\Version\OrVersionConstraintGroup
|
||||
*/
|
||||
class OrVersionConstraintGroupTest extends TestCase {
|
||||
public function testReturnsTrueIfOneConstraintReturnsFalse() {
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$secondConstraint = $this->createMock(VersionConstraint::class);
|
||||
|
||||
$firstConstraint->expects($this->once())
|
||||
@@ -34,7 +34,7 @@ class OrVersionConstraintGroupTest extends TestCase {
|
||||
}
|
||||
|
||||
public function testReturnsTrueIfAllConstraintsReturnsTrue() {
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$secondConstraint = $this->createMock(VersionConstraint::class);
|
||||
|
||||
$firstConstraint->expects($this->once())
|
||||
@@ -47,7 +47,7 @@ class OrVersionConstraintGroupTest extends TestCase {
|
||||
}
|
||||
|
||||
public function testReturnsFalseIfAllConstraintsReturnsFalse() {
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$firstConstraint = $this->createMock(VersionConstraint::class);
|
||||
$secondConstraint = $this->createMock(VersionConstraint::class);
|
||||
|
||||
$firstConstraint->expects($this->once())
|
||||
|
||||
46
vendor/phar-io/version/tests/Unit/PreReleaseSuffixTest.php
vendored
Normal file
46
vendor/phar-io/version/tests/Unit/PreReleaseSuffixTest.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace PharIo\Version;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \PharIo\Version\PreReleaseSuffix
|
||||
*/
|
||||
class PreReleaseSuffixTest extends TestCase {
|
||||
/**
|
||||
* @dataProvider greaterThanProvider
|
||||
*
|
||||
* @param string $leftSuffixValue
|
||||
* @param string $rightSuffixValue
|
||||
* @param bool $expectedResult
|
||||
*/
|
||||
public function testGreaterThanReturnsExpectedResult(
|
||||
$leftSuffixValue,
|
||||
$rightSuffixValue,
|
||||
$expectedResult
|
||||
) {
|
||||
$leftSuffix = new PreReleaseSuffix($leftSuffixValue);
|
||||
$rightSuffix = new PreReleaseSuffix($rightSuffixValue);
|
||||
|
||||
$this->assertSame($expectedResult, $leftSuffix->isGreaterThan($rightSuffix));
|
||||
}
|
||||
|
||||
public function greaterThanProvider() {
|
||||
return [
|
||||
['alpha1', 'alpha2', false],
|
||||
['alpha2', 'alpha1', true],
|
||||
['beta1', 'alpha3', true],
|
||||
['b1', 'alpha3', true],
|
||||
['b1', 'a3', true],
|
||||
['dev1', 'alpha2', false],
|
||||
['dev1', 'alpha2', false],
|
||||
['alpha2', 'dev5', true],
|
||||
['rc1', 'beta2', true],
|
||||
['patch5', 'rc7', true],
|
||||
['alpha1', 'alpha.2', false],
|
||||
['alpha.3', 'alpha2', true],
|
||||
['alpha.3', 'alpha.2', true],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace PharIo\Version;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers PharIo\Version\SpecificMajorAndMinorVersionConstraint
|
||||
* @covers \PharIo\Version\SpecificMajorAndMinorVersionConstraint
|
||||
*/
|
||||
class SpecificMajorAndMinorVersionConstraintTest extends TestCase {
|
||||
public function versionProvider() {
|
||||
@@ -32,10 +32,10 @@ class SpecificMajorAndMinorVersionConstraintTest extends TestCase {
|
||||
/**
|
||||
* @dataProvider versionProvider
|
||||
*
|
||||
* @param int $major
|
||||
* @param int $minor
|
||||
* @param int $major
|
||||
* @param int $minor
|
||||
* @param Version $version
|
||||
* @param bool $expectedResult
|
||||
* @param bool $expectedResult
|
||||
*/
|
||||
public function testReturnsTrueForCompliantVersions($major, $minor, Version $version, $expectedResult) {
|
||||
$constraint = new SpecificMajorAndMinorVersionConstraint('foo', $major, $minor);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PharIo\Version;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers PharIo\Version\SpecificMajorVersionConstraint
|
||||
* @covers \PharIo\Version\SpecificMajorVersionConstraint
|
||||
*/
|
||||
class SpecificMajorVersionConstraintTest extends TestCase {
|
||||
public function versionProvider() {
|
||||
@@ -32,9 +32,9 @@ class SpecificMajorVersionConstraintTest extends TestCase {
|
||||
/**
|
||||
* @dataProvider versionProvider
|
||||
*
|
||||
* @param int $major
|
||||
* @param int $major
|
||||
* @param Version $version
|
||||
* @param bool $expectedResult
|
||||
* @param bool $expectedResult
|
||||
*/
|
||||
public function testReturnsTrueForCompliantVersions($major, Version $version, $expectedResult) {
|
||||
$constraint = new SpecificMajorVersionConstraint('foo', $major);
|
||||
|
||||
@@ -24,9 +24,16 @@ class VersionTest extends TestCase {
|
||||
* @param string $expectedMinor
|
||||
* @param string $expectedPatch
|
||||
* @param string $expectedPreReleaseValue
|
||||
* @param int $expectedReleaseCount
|
||||
* @param int $expectedReleaseCount
|
||||
*/
|
||||
public function testParsesVersionNumbers($versionString, $expectedMajor, $expectedMinor, $expectedPatch, $expectedPreReleaseValue = '', $expectedReleaseCount = 0) {
|
||||
public function testParsesVersionNumbers(
|
||||
$versionString,
|
||||
$expectedMajor,
|
||||
$expectedMinor,
|
||||
$expectedPatch,
|
||||
$expectedPreReleaseValue = '',
|
||||
$expectedReleaseCount = 0
|
||||
) {
|
||||
$version = new Version($versionString);
|
||||
|
||||
$this->assertSame($expectedMajor, $version->getMajor()->getValue());
|
||||
@@ -56,7 +63,7 @@ class VersionTest extends TestCase {
|
||||
*
|
||||
* @param Version $versionA
|
||||
* @param Version $versionB
|
||||
* @param bool $expectedResult
|
||||
* @param bool $expectedResult
|
||||
*/
|
||||
public function testIsGreaterThan(Version $versionA, Version $versionB, $expectedResult) {
|
||||
$this->assertSame($expectedResult, $versionA->isGreaterThan($versionB));
|
||||
@@ -75,6 +82,10 @@ class VersionTest extends TestCase {
|
||||
[new Version('2.5.8'), new Version('1.6.8'), true],
|
||||
[new Version('2.5.8'), new Version('2.6.8'), false],
|
||||
[new Version('2.5.8'), new Version('3.1.2'), false],
|
||||
[new Version('3.0.0-alpha1'), new Version('3.0.0-alpha2'), false],
|
||||
[new Version('3.0.0-alpha2'), new Version('3.0.0-alpha1'), true],
|
||||
[new Version('3.0.0-alpha.1'), new Version('3.0.0'), false],
|
||||
[new Version('3.0.0'), new Version('3.0.0-alpha.1'), true],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -83,8 +94,7 @@ class VersionTest extends TestCase {
|
||||
*
|
||||
* @param string $versionString
|
||||
*/
|
||||
public function testThrowsExceptionIfVersionStringDoesNotFollowSemVer($versionString)
|
||||
{
|
||||
public function testThrowsExceptionIfVersionStringDoesNotFollowSemVer($versionString) {
|
||||
$this->expectException(InvalidVersionException::class);
|
||||
new Version($versionString);
|
||||
}
|
||||
@@ -92,8 +102,7 @@ class VersionTest extends TestCase {
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function invalidVersionStringProvider()
|
||||
{
|
||||
public function invalidVersionStringProvider() {
|
||||
return [
|
||||
['foo'],
|
||||
['0.0.1-dev+ABC', '0', '0', '1', 'dev', 'ABC'],
|
||||
|
||||
Reference in New Issue
Block a user