tests ported to phpUnit