public function test_isSecure() { //We use some unit test variables to make sure that in a real-world scenario, //if a server were to be using HTTPS, it would be able to detect it (normally 443) $_SERVER['SERVER_PORT'] = 80; $this->assertEquals(false, Engine::isSecure()); $_SERVER['SERVER_PORT'] = 443; $this->assertEquals(true, Engine::isSecure()); }