Exemplo n.º 1
0
 public function testCreateRequest()
 {
     $httpConverter = new HTTPConverter();
     $_SERVER['REQUEST_METHOD'] = 'GET';
     $_SERVER['REQUEST_URI'] = '/';
     //$_SERVER['REQUEST_URI'] = '/blog/slug/id';
     $request = $httpConverter->createRequest();
     $this->assertTrue($request instanceof Request);
 }
Exemplo n.º 2
0
<?php

/*
 * Generic entry point/ front controller.
 */
use SkooppaOS\webMVc\HTTPConverter;
//autoload classes
require_once __DIR__ . '/../vendor/autoload.php';
$httpConverter = new HTTPConverter();
$request = $httpConverter->createRequest();
$response = $httpConverter->handleRequest();
$httpConverter->sendResponse();