Esempio n. 1
0
 public function testThatDispatcherReturnsActionOutput()
 {
     $className = "\\Lenv\\App\\Controllers\\Home";
     $methodName = "IndexAction";
     $dispatcher = new Dispatcher();
     $dispatcher->setControllerClassName($className);
     $dispatcher->setMethodName($methodName);
     $dispatchMethod = $dispatcher->dispatch();
     $this->assertEquals($methodName, $dispatchMethod);
 }
Esempio n. 2
0
<?php

namespace Lenv;

use Lenv\App\Core\Dispatcher;
error_reporting('0');
ini_set("display_errors", 0);
require_once __DIR__ . '/vendor/autoload.php';
$dispatcher = new Dispatcher($_GET);
$dispatched = $dispatcher->dispatch();
echo $dispatched;