/**
  * @covers Starter\routers\TraitStarterRouter::show_result
  */
 public function test_show_result()
 {
     $method = new \ReflectionMethod($this->router, 'show_result');
     $method->setAccessible(true);
     $response = new GetResponse();
     $response->blocks['left'] = '';
     $response->blocks['main'] = '';
     $response->blocks['header'] = '';
     ob_start();
     \Starter::$current_router = AdminPanelRouter::class;
     $method->invoke($this->router, $response);
     \Starter::$current_router = SiteRouter::class;
     $method->invoke($this->router, $response);
     ob_end_clean();
     self::assertNull(error_get_last());
 }
Ejemplo n.º 2
0
<?php

require_once 'config.php';
require_once 'libs/Starter.php';
require_once 'libs/Controller.php';
require_once 'libs/Model.php';
require_once 'libs/View.php';
// Library
require_once 'libs/Database/Query.php';
require_once 'libs/Database/Database.php';
require_once 'libs/Database/Result.php';
require_once 'libs/Session.php';
require_once 'libs/Auth.php';
// Load the Starter!
$starter = new Starter();
// Optional Path Settings
//$bootstrap->setControllerPath();
//$bootstrap->setModelPath();
//$bootstrap->setDefaultFile();
//$bootstrap->setErrorFile();
$starter->init();
Ejemplo n.º 3
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('memberarea/logout', 'MemberAreaLogout');
Ejemplo n.º 4
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('memberarea/email', 'MemberAreaEmail');
Ejemplo n.º 5
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/balance', 'MainBalance');
Ejemplo n.º 6
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('admin/main', 'AdminMain');
<?php

use common\classes\GetResponse;
class SilentAdminPanelRouter extends \Starter\routers\AdminPanelRouter
{
    public function __destruct()
    {
    }
    protected function show_result(GetResponse $response)
    {
    }
}
\Starter::$current_router = \Starter\routers\AdminPanelRouter::class;
/**
 * Class AdminPanelRouterTest
 *
 */
class AdminPanelRouterTest extends PHPUnit_Framework_TestCase
{
    /**
     * @var $router \Starter\routers\AdminPanelRouter
     */
    private $router;
    public function setUp()
    {
        $this->router = new SilentAdminPanelRouter();
    }
    /**
     * @covers \Starter\routers\AdminPanelRouter::__construct
     */
    public function test_construct()
Ejemplo n.º 8
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/profile', 'MainProfile');
Ejemplo n.º 9
0
 static function set_controller_class($controller_class)
 {
     self::$controller_class = $controller_class;
 }
Ejemplo n.º 10
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/userProfile', 'MainUserProfile');
Ejemplo n.º 11
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('memberarea/registration', 'MemberAreaRegistration');
Ejemplo n.º 12
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/autocomplete', 'AutoComplete');
Ejemplo n.º 13
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/index', 'MainIndex');
Ejemplo n.º 14
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/actions', 'Actions');