Skip to content

Instantly share code, notes, and snippets.

@itspriddle
Created April 17, 2013 01:56
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 14 You must be signed in to fork a gist
  • Save itspriddle/5401213 to your computer and use it in GitHub Desktop.
Save itspriddle/5401213 to your computer and use it in GitHub Desktop.
Install PHPUnit on OS X Mountain Lion using Homebrew
require 'formula'
class Phpunit < Formula
homepage 'http://www.phpunit.de/manual/current/en/index.html'
url 'http://pear.phpunit.de/get/phpunit.phar'
sha1 '7aaa26086ddf7cd0c517d7f52b74a53a7a1d7e29'
version 'HEAD'
def install
bin.install "phpunit.phar" => "phpunit"
end
end
@itspriddle
Copy link
Author

Install with:

brew install https://gist.github.com/itspriddle/5401213/raw/phpunit.rb

@azizur
Copy link

azizur commented Jun 10, 2013

Error: SHA1 mismatch
Expected: 7aaa26086ddf7cd0c517d7f52b74a53a7a1d7e29
Actual: e3644434a01dab6292b0d2319cc52e85a08ce807

@wagnerjsilva
Copy link

Doesn't work...

Error: SHA1 mismatch
Expected: 7aaa26086ddf7cd0c517d7f52b74a53a7a1d7e29
Actual: e3644434a01dab6292b0d2319cc52e85a08ce807
Archive: /Library/Caches/Homebrew/phpunit-HEAD.phar
(To retry an incomplete download, remove the file above.)

@funkytaco
Copy link

brew install https://gist.github.com/itspriddle/5401213/raw/phpunit.rb

################################################################## 100.0%

==> Downloading http://pear.phpunit.de/get/phpunit.phar

################################################################## 100.0%

Error: SHA1 mismatch
Expected: 7aaa26086ddf7cd0c517d7f52b74a53a7a1d7e29
Actual: 88d4919ffc91c9aec8aea2b28e500d3e43e2b13b
Archive: /Library/Caches/Homebrew/phpunit-HEAD.phar
(To retry an incomplete download, remove the file above.)

@funkytaco
Copy link

I forked the gist, modified the SHA, and it works. If the SHA changes, just fork my gist.

brew install https://gist.github.com/funkytaco/5969775/raw/phpunit.rb

@steinmb
Copy link

steinmb commented Aug 11, 2013

@funkytaco fork also failed:

brew install https://gist.github.com/funkytaco/5969775/raw/phpunit.rb

################################################################## 100,0%

==> Downloading http://pear.phpunit.de/get/phpunit.phar

################################################################## 100,0%

Error: SHA1 mismatch
Expected: 88d4919ffc91c9aec8aea2b28e500d3e43e2b13b
Actual: de677ba60b2ccd135002d02501cde16a471503f5
Archive: /Library/Caches/Homebrew/phpunit-HEAD.phar
(To retry an incomplete download, remove the file above.)

@zonabi
Copy link

zonabi commented Aug 29, 2013

working version 20130829

brew install https://gist.github.com/zonabi/6380270/raw/8c6daabc1b4cfef569ea3b595adc323de8a70b9c/phpunit.rb

as mentioned, when it breaks, just copy the new SHA hash in a fork of this gist and fix it.

@shakie
Copy link

shakie commented Dec 17, 2013

Location of the phar has changed along with the checksum. I have forked the gist here https://gist.github.com/shakie/8005291 and to install run this;

brew install https://gist.github.com/shakie/8005291/raw/450ca2e9b29eae9dd115a9de450fbae9efd50e19/phpunit.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment