示例#1
0
 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));
 }
示例#2
0
 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']));
 }