added phpunit tests, josh and shuotian