Project source. Compiled PHAR.

I use a skelgen tool to build PHP unit tests, as this saves time. The most current edition was written by S Bergmann who writes/ manages the phpunit project. He discarded the skelgen sub-project a few years ago. Whilst IDEs can build unit-tests, I think my current solution is more reliable, as IDEs are likely to use this skelgen.
Version 6 of phpunit has changed the namespace of the classes, so my generated tests are not runnable. I would like to keep using the new version of phpunit, so will be forced to clone and update the skelgen project. This has the secondary benefit of being able to tweak the script creation process abit, so I need to do less manual typing after test creation.

I will probably do a chunk of work on this at xmas 2017. EDIT Jan 2018: work was done, I have added the links to the top of this article. This project contained less code than I was expecting.

Notes for oab1

  • write myself a template phpunit.xml, to go into oab1-conf
  • change created namespaces to current phpunit 6
  • put result file in ../Tests/
  • get testee class mentioned as a use statement
  • change default testee variable to 'obj'
  • change autodoc to something more useful
  • Add type decls to functions
  • sniff testee constructor, add a comment of what args to pass
  • think about shipping my test abstract base classes in the phpunit-skelgen phar; may not work, as you don't load the skelgen when running the test...
  • skip tests on setter methods (as punit does)
  • maybe create a “my first test” template, with lots of comments.