Fix BindingResolutionError when debug toolbar isn't present (#465)
* Fix BindingResolutionError when debug toolbar isn't present * Formatting
This commit is contained in:
@@ -20,17 +20,24 @@ class VersionTest extends TestCase
|
||||
public function testGreaterThanVersionStrings(): void
|
||||
{
|
||||
$test = [
|
||||
'7.0.0' => '6.0.0',
|
||||
'7.0.0+1231s' => '6.0.0',
|
||||
'7.0.0-beta' => '7.0.0-alpha',
|
||||
'7.0.0-beta.1' => '7.0.0-beta',
|
||||
'7.0.0-beta.2' => '7.0.0-beta.1',
|
||||
'7.0.0-beta.2+a34sdf' => '7.0.0-beta.1',
|
||||
['7.0.0' => '6.0.0'],
|
||||
['7.0.0+1231s' => '6.0.0'],
|
||||
// ['7.0.0-beta' => '7.0.0-dev'],
|
||||
['7.0.0-beta' => '7.0.0-alpha'],
|
||||
['7.0.0-beta.1' => '7.0.0-beta'],
|
||||
['7.0.0-beta.2' => '7.0.0-beta.1'],
|
||||
['7.0.0-beta.2+a34sdf' => '7.0.0-beta.1'],
|
||||
];
|
||||
|
||||
$versionSvc = app(VersionService::class);
|
||||
foreach ($test as $newVersion => $currentVersion) {
|
||||
$this->assertTrue($versionSvc->isGreaterThan($newVersion, $currentVersion));
|
||||
foreach ($test as $set) {
|
||||
$newVersion = array_key_first($set);
|
||||
$currentVersion = $set[$newVersion];
|
||||
|
||||
$this->assertTrue(
|
||||
$versionSvc->isGreaterThan($newVersion, $currentVersion),
|
||||
"{$newVersion} not greater than ${currentVersion}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user