/**
  * @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());
 }
예제 #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();
예제 #3
0
파일: logout.php 프로젝트: tv13/bambitav
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('memberarea/logout', 'MemberAreaLogout');
예제 #4
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('memberarea/email', 'MemberAreaEmail');
예제 #5
0
파일: balance.php 프로젝트: tv13/bambitav
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/balance', 'MainBalance');
예제 #6
0
파일: admin.php 프로젝트: tv13/bambitav
<?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()
예제 #8
0
파일: profile.php 프로젝트: tv13/bambitav
<?php

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

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/userProfile', 'MainUserProfile');
예제 #11
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('memberarea/registration', 'MemberAreaRegistration');
예제 #12
0
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/autocomplete', 'AutoComplete');
예제 #13
0
파일: index.php 프로젝트: tv13/bambitav
<?php

require_once dirname(__FILE__) . '/main.inc.php';
Starter::standart_run('main/index', 'MainIndex');
예제 #14
0
파일: actions.php 프로젝트: tv13/bambitav
<?php

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