示例#1
0
<?php

/*
 * This file is part of the scribd.technical.test package.
 *
 * (c) Daniel González <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
require __DIR__ . '/../vendor/autoload.php';
use Component\Http\Request;
use App\Application;
$request = Request::createFromGlobals();
$app = new Application();
$app['debug'] = true;
$response = $app->handle($request);
$response->send();
示例#2
0
 public function testCreateFromGlobals()
 {
     $request = Request::createFromGlobals();
     $this->assertEquals(false, $request->get('server', 'REMOTE_ADDR', false));
     $this->assertEquals(false, $request->get('server', 'HTTP_USER_AGENT', false));
 }