public function testRedirection() { $answer = new Http(); $this->assertInstanceOf(Http::class, $answer->doRedirection('http://127.0.0.1/')); $this->assertEquals(302, $answer->getStatus()); $this->assertEquals('http://127.0.0.1/', $answer->getLocation()); $answer->doRedirection('http://127.0.0.1/', 301); $this->assertEquals(301, $answer->getStatus()); }