From 567d38eafe6693f5af0ae93f8a34e76ee000e868 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 2 Mar 2018 08:26:37 -0600 Subject: [PATCH] update tests --- tests/BrewTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/BrewTest.php b/tests/BrewTest.php index e50ddba97..cfbe047e4 100644 --- a/tests/BrewTest.php +++ b/tests/BrewTest.php @@ -66,6 +66,7 @@ public function test_installed_returns_false_when_given_formula_is_not_installed public function test_has_installed_php_indicates_if_php_is_installed_via_brew() { $brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]); + $brew->shouldReceive('installed')->with('php')->andReturn(true); $brew->shouldReceive('installed')->with('php72')->andReturn(true); $brew->shouldReceive('installed')->with('php71')->andReturn(false); $brew->shouldReceive('installed')->with('php70')->andReturn(false); @@ -73,6 +74,7 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew() $this->assertTrue($brew->hasInstalledPhp()); $brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]); + $brew->shouldReceive('installed')->with('php')->andReturn(false); $brew->shouldReceive('installed')->with('php72')->andReturn(false); $brew->shouldReceive('installed')->with('php71')->andReturn(true); $brew->shouldReceive('installed')->with('php70')->andReturn(false); @@ -80,6 +82,7 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew() $this->assertTrue($brew->hasInstalledPhp()); $brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]); + $brew->shouldReceive('installed')->with('php')->andReturn(false); $brew->shouldReceive('installed')->with('php72')->andReturn(false); $brew->shouldReceive('installed')->with('php71')->andReturn(false); $brew->shouldReceive('installed')->with('php70')->andReturn(true); @@ -87,6 +90,7 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew() $this->assertTrue($brew->hasInstalledPhp()); $brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]); + $brew->shouldReceive('installed')->with('php')->andReturn(false); $brew->shouldReceive('installed')->with('php72')->andReturn(false); $brew->shouldReceive('installed')->with('php71')->andReturn(false); $brew->shouldReceive('installed')->with('php70')->andReturn(false); @@ -94,6 +98,7 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew() $this->assertTrue($brew->hasInstalledPhp()); $brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]); + $brew->shouldReceive('installed')->with('php')->andReturn(false); $brew->shouldReceive('installed')->with('php72')->andReturn(false); $brew->shouldReceive('installed')->with('php71')->andReturn(false); $brew->shouldReceive('installed')->with('php70')->andReturn(false);