Пример #1
0
 public function test_get_and_set_server_global()
 {
     $request = new HttpRequest();
     $global = $request->getServerGlobal();
     $this->assertTrue($global instanceof ISuperGlobal);
     $_SERVER['foo'] = 'bar';
     $this->assertEquals('bar', $global->get('foo'));
     $global = new ServerGlobal();
     $request->setServerGlobal($global);
     $this->assertTrue($global === $request->getServerGlobal());
 }