pear/pear-core — pull request #6 by matslindh (2012-07-19 12:44:32+00:00)
Title: Fix issue with php-cgi still being the interpreter in --CLEAN-- with tests using php-cgi

This commit fixes an issue with RunTest not resetting the interpreter
before running the --CLEAN-- section after running a test that needs
the php-cgi binary. Without this patch the cgi binary will output its headers, making RunTest barf on the output in the --CLEAN-- section.

The commit also moves the save / restore feature of which binary to use to two dedicated functions, to allow for improved reuse.

A simple test, not-perfect test is available in 7899b669a910a080668b43b9d6414724a56fc47f.

I'm not sure about how to implement the test to correctly do PASS/FAIL as it's dependent on the output of the test runner itself. One possibility is to implement a state / list of errors that'll be set if the --CLEAN-- section produces errors.