[chef] How to install PHPUnit using Chef?


Chronological Thread 
  • From: Andrew Havens < >
  • To: " " < >
  • Subject: [chef] How to install PHPUnit using Chef?
  • Date: Mon, 3 Oct 2011 21:31:01 +0000
  • Accept-language: en-US

Hello,

I am using Chef via Vagrant and am trying to install PHPUnit. I am able to install PHP and PEAR, but when it comes to installing PHPUnit, it does not work. I'm using a recipe that I found online, but it doesn't seem to work:

channels = %w{pear.phpunit.de components.ez.no pear.symfony-project.com}

channels.each do |chan|

  php_pear_channel chan do

    action [:discover, :update]

  end

end


php_pear "HTTP_Request2" do

  preferred_state "beta"

  action :install

end


php_pear "XML_RPC2" do

  action :install

end


php_pear "PHPUnit" do

  channel "phpunit"

  action :install

end


All of the commands seem to execute just fine, but when I ssh into the virtual machine, PHPUnit is not installed. I can install it (including all dependencies) from the command line with this command:


sudo pear install –a phpunit/PHPUnit


How can I run this command using Chef?


Thanks for your help,

--Andrew




Archive powered by MHonArc 2.6.16.

§