Exemplo n.º 1
0
 public function testDefaults()
 {
     $request = new Request();
     $this->assertSame('GET / HTTP/1.0', $request->getStartLine());
     $this->assertSame('1.0', $request->getProtocolVersion());
     $this->assertNull($request->getBody());
     $this->assertSame([], $request->getHeaders());
     $this->assertSame([], $request->getQuery());
     $this->assertSame([], $request->getPost());
     $this->assertSame([], $request->getCookie());
     $this->assertSame([], $request->getFiles());
     $this->assertFalse($request->isSecure());
     $this->assertSame('GET', $request->getMethod());
     $this->assertSame('localhost', $request->getHost());
     $this->assertSame(80, $request->getPort());
     $this->assertSame('/', $request->getRequestUri());
     $this->assertSame('/', $request->getPath());
     $this->assertSame('', $request->getQueryString());
     $this->assertSame('0.0.0.0', $request->getClientIp());
 }