jolicode/chef-cookbook-php — pull request #5 by motns (2013-05-06 04:44:25+00:00)
Title: Cookbook testing

First of all, I'd like to apologize for the size of the pull request - if you don't want to merge it, I understand (no hard feelings).
I really liked the simplified approach that you took with this cookbook (especially the nice and clean config files), so I decided to base our new infrastructure on it, as opposed to using the official Opscode php cookbook.

My original intention was to make a few small fixes, and more importantly add some tests to make sure things work. The unit and integration tests that I added flagged a number of issues with the existing code, and so I went ahead and put in fixes for those, at which point things got a little out of hand... :P

**Summary of changes**

* Tests
* Added unit tests via Strainer, which runs `knife test` for a basic syntax check, followed by Foodcritic for linting. These tests also work in Travis CI, so you can add a shiny build badge to your Readme if you like! ;)
* Added integration tests via Opscode's Test Kitchen (1.0 alpha release). These will converge all the recipes on a number of platforms (Ubuntu, CentOS, Debian), and then run a number of tests to verify the state of the machine. These will only run on your local workstation.
* Syntax fixes
* The Foodcritic test flagged a number of "violations", so I took the liberty and lined those up with current best practices.
* Platform support
* I noticed that you listed pretty much all available platforms in the `metadata.rb` file, but when running the integration tests I found that the recipes were broken on most of them. Again, I went ahead and fixed these where it was possible. I also updated the Readme and metadata to reflect the actual compatibility.
* Customisation
* I added a few more configurable options to both the `php.ini` files, and the php-fpm configurations.

You can find a short overview about the tests on our Readme page [here](https://github.com/hipsnip-cookbooks/cookbook-development).

We don't really want to maintain a separate fork of your repo, so it would be really nice if we could get these changes back to your somehow. I'm happy to talk you through the tests in more detail, and maybe break down the changes into more manageable chunks.