Exemple #1
0
 public function testIntegration()
 {
     $request = Request::create('foo/dummy.txt', 'GET', array('name' => 'Gonzalo'));
     $gfw = new Web($request);
     $response = $gfw->getResponse();
     $this->assertTrue($response instanceof Response);
     $this->assertEquals("Hi Gonzalo", $response->getContent());
 }
Exemple #2
0
<?php

require_once __DIR__ . '/../../vendor/autoload.php';
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Gfw\Web;
$web = new Web(Request::createFromGlobals());
$web->setUpViewEnvironment(__DIR__ . "/../cache", TRUE);
$web->registerNamespace('App', __DIR__ . '/..');
$web->registerConfFromPath(__DIR__ . "/../Conf.php");
$web->getResponse()->send();