public function testServerUrlWithObject() { $_SERVER['HTTPS'] = 'off'; $_SERVER['HTTP_HOST'] = 'example.com'; $_SERVER['REQUEST_URI'] = '/foo.html'; $url = new Helper\ServerUrl(); $this->assertEquals('http://example.com', $url->direct(new \stdClass())); }