@@ -30,36 +30,36 @@ public function test_brew_can_be_resolved_from_container()
3030 public function test_installed_returns_true_when_given_formula_is_installed ()
3131 {
3232 $ cli = Mockery::mock (CommandLine::class);
33- $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php70 ' )->andReturn ('php70 ' );
33+ $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php71 ' )->andReturn ('php71 ' );
3434 swap (CommandLine::class, $ cli );
35- $ this ->assertTrue (resolve (Brew::class)->installed ('php70 ' ));
35+ $ this ->assertTrue (resolve (Brew::class)->installed ('php71 ' ));
3636
3737 $ cli = Mockery::mock (CommandLine::class);
38- $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php70 ' )->andReturn ('php70 -mcrypt
39- php70 ' );
38+ $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php71 ' )->andReturn ('php71 -mcrypt
39+ php71 ' );
4040 swap (CommandLine::class, $ cli );
41- $ this ->assertTrue (resolve (Brew::class)->installed ('php70 ' ));
41+ $ this ->assertTrue (resolve (Brew::class)->installed ('php71 ' ));
4242 }
4343
4444
4545 public function test_installed_returns_false_when_given_formula_is_not_installed ()
4646 {
4747 $ cli = Mockery::mock (CommandLine::class);
48- $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php70 ' )->andReturn ('' );
48+ $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php71 ' )->andReturn ('' );
4949 swap (CommandLine::class, $ cli );
50- $ this ->assertFalse (resolve (Brew::class)->installed ('php70 ' ));
50+ $ this ->assertFalse (resolve (Brew::class)->installed ('php71 ' ));
5151
5252 $ cli = Mockery::mock (CommandLine::class);
53- $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php70 ' )->andReturn ('php70 -mcrypt ' );
53+ $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php71 ' )->andReturn ('php71 -mcrypt ' );
5454 swap (CommandLine::class, $ cli );
55- $ this ->assertFalse (resolve (Brew::class)->installed ('php70 ' ));
55+ $ this ->assertFalse (resolve (Brew::class)->installed ('php71 ' ));
5656
5757 $ cli = Mockery::mock (CommandLine::class);
58- $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php70 ' )->andReturn ('php70 -mcrypt
59- php70 -something-else
58+ $ cli ->shouldReceive ('runAsUser ' )->once ()->with ('brew list | grep php71 ' )->andReturn ('php71 -mcrypt
59+ php71 -something-else
6060php7 ' );
6161 swap (CommandLine::class, $ cli );
62- $ this ->assertFalse (resolve (Brew::class)->installed ('php70 ' ));
62+ $ this ->assertFalse (resolve (Brew::class)->installed ('php71 ' ));
6363 }
6464
6565
@@ -91,10 +91,11 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
9191 public function test_tap_taps_the_given_homebrew_repository ()
9292 {
9393 $ cli = Mockery::mock (CommandLine::class);
94+ $ cli ->shouldReceive ('passthru ' )->once ()->with ('sudo -u ' .user ().' brew tap php71 ' );
9495 $ cli ->shouldReceive ('passthru ' )->once ()->with ('sudo -u ' .user ().' brew tap php70 ' );
9596 $ cli ->shouldReceive ('passthru ' )->once ()->with ('sudo -u ' .user ().' brew tap php56 ' );
9697 swap (CommandLine::class, $ cli );
97- resolve (Brew::class)->tap ('php70 ' , 'php56 ' );
98+ resolve (Brew::class)->tap ('php71 ' , ' php70 ' , 'php56 ' );
9899 }
99100
100101
@@ -120,9 +121,9 @@ public function test_linked_php_returns_linked_php_formula_name()
120121 {
121122 $ files = Mockery::mock (Filesystem::class);
122123 $ files ->shouldReceive ('isLink ' )->once ()->with ('/usr/local/bin/php ' )->andReturn (true );
123- $ files ->shouldReceive ('readLink ' )->once ()->with ('/usr/local/bin/php ' )->andReturn ('/test/path/php70 /test ' );
124+ $ files ->shouldReceive ('readLink ' )->once ()->with ('/usr/local/bin/php ' )->andReturn ('/test/path/php71 /test ' );
124125 swap (Filesystem::class, $ files );
125- $ this ->assertSame ('php70 ' , resolve (Brew::class)->linkedPhp ());
126+ $ this ->assertSame ('php71 ' , resolve (Brew::class)->linkedPhp ());
126127
127128 $ files = Mockery::mock (Filesystem::class);
128129 $ files ->shouldReceive ('isLink ' )->once ()->with ('/usr/local/bin/php ' )->andReturn (true );
0 commit comments