I\'m mostly convinced of the benefits of unit testing, and I would like to start applying the concept to a large existing codebase written in PHP. Less than 10% of this code is
You could try to include your non-oop code into a test class using
require_once 'your_non_oop_file.php' # Contains fct_to_test()
And with phpUnit you define your test function :
testfct_to_test() { assertEquals( result_expected, fct_to_test(), 'Fail with fct_to_test' ); }