Php tests

Worked with Alexey to bring this up to par.  Still needs linter, docs, and static code analysis.