mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 08:10:07 +01:00
Update normalizePhpVersion regex
Handle "php@8.1" Simplify the entire method into one block Co-Authored-By: Nathan Morgan <nathan@fuelingtheweb.com>
This commit is contained in:
@@ -51,6 +51,15 @@ public function test_it_can_generate_sock_file_name_from_php_version()
|
||||
$this->assertEquals('valet72.sock', resolve(PhpFpm::class)->fpmSockName('72'));
|
||||
}
|
||||
|
||||
public function test_it_normalizes_php_versions()
|
||||
{
|
||||
$this->assertEquals('php@8.1', resolve(PhpFpm::class)->normalizePhpVersion('php@8.1'));
|
||||
$this->assertEquals('php@8.1', resolve(PhpFpm::class)->normalizePhpVersion('php8.1'));
|
||||
$this->assertEquals('php@8.1', resolve(PhpFpm::class)->normalizePhpVersion('php81'));
|
||||
$this->assertEquals('php@8.1', resolve(PhpFpm::class)->normalizePhpVersion('8.1'));
|
||||
$this->assertEquals('php@8.1', resolve(PhpFpm::class)->normalizePhpVersion('81'));
|
||||
}
|
||||
|
||||
public function test_utilized_php_versions()
|
||||
{
|
||||
$fileSystemMock = Mockery::mock(Filesystem::class);
|
||||
|
||||
Reference in New Issue
Block a user