Fixed Tests for PHP 5.3

There were a few function dereferencing in the tests which caused the tests to fail in PHP 5.3