Skip to content

Instantly share code, notes, and snippets.

@itspriddle
Created April 17, 2013 01:56
Show Gist options
  • 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
@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