1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

use formula to restart php instead of version

This commit is contained in:
James Barnard
2019-01-29 08:49:08 +00:00
committed by Matt Stauffer
parent 290c22a1f7
commit e5e7c74f1d
2 changed files with 9 additions and 1 deletions

View File

@@ -259,7 +259,7 @@ function ($version) use ($resolvedPhpVersion) {
*/ */
function restartLinkedPhp() function restartLinkedPhp()
{ {
$this->restartService($this->linkedPhp()); $this->restartService($this->getLinkedPhpFormula());
} }
/** /**

View File

@@ -406,6 +406,14 @@ public function test_get_linked_php_formula_will_return_linked_php_directory($pa
$this->assertSame($expectedLinkFormula, $brewMock->getLinkedPhpFormula()); $this->assertSame($expectedLinkFormula, $brewMock->getLinkedPhpFormula());
} }
public function test_restart_linked_php_will_pass_through_linked_php_formula_to_restart_service()
{
$brewMock = Mockery::mock(Brew::class)->makePartial();
$brewMock->shouldReceive('getLinkedPhpFormula')->once()->andReturn('php@7.2-test');
$brewMock->shouldReceive('restartService')->once()->with('php@7.2-test');
$brewMock->restartLinkedPhp();
}
/** /**
* Provider of php links and their expected split matches * Provider of php links and their expected split matches
* *