Fixed tests which require a webserver
Fixed syntax for PHP 5.3
Fixed tests