public function testMethodReturnsRightStuff() { $this->assertEquals('', $this->request->getMethod()); $_SERVER['REQUEST_METHOD'] = 'GET'; $this->assertEquals('get', $this->request->getMethod()); $this->assertEquals('GET', $this->request->getMethod(true)); }
public function testAcceptLanguageBasics() { $this->request->setHeader('Accept-Language', 'da, en-gb;q=0.8, en;q=0.7'); $this->assertEquals('da', $this->negotiate->language(['da', 'en'])); $this->assertEquals('en-gb', $this->negotiate->language(['en-gb', 'en'])); $this->assertEquals('en', $this->negotiate->language(['en'])); }