예제 #1
0
 public function testGetUserAgent()
 {
     $request = new Request();
     $this->assertEquals(null, $request->getUserAgent());
     $request->setEnvironmentData(['HTTP_USER_AGENT' => 'MyBrowser (v1.0; test; hello world)']);
     $this->assertEquals('MyBrowser (v1.0; test; hello world)', $request->getUserAgent());
 }