fixed tests
added some php doc