Example #1
0
 /**
  * @covers Imbo\Application::run
  */
 public function testApplicationSetsTrustedProxies()
 {
     $this->expectOutputRegex('|{"version":"' . preg_quote(Version::VERSION, '|') . '",.*}|');
     $this->assertEmpty(Request::getTrustedProxies());
     $this->application->run(array('database' => $this->getMock('Imbo\\Database\\DatabaseInterface'), 'storage' => $this->getMock('Imbo\\Storage\\StorageInterface'), 'eventListenerInitializers' => [], 'eventListeners' => [], 'contentNegotiateImages' => false, 'resources' => [], 'routes' => [], 'auth' => [], 'trustedProxies' => ['10.0.0.77']));
     $this->assertSame(['10.0.0.77'], Request::getTrustedProxies());
 }