예제 #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);
 }
예제 #2
0
파일: index.php 프로젝트: alucardatem/Lenv
<?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;