public function setUp() { Configure::load('../app/config/config.php'); $viewPath = '../app/View'; $layoutPath = '../app/Layout'; $elementPath = '../app/View/Element'; $this->view = new ViewAdapter($viewPath, $layoutPath, $elementPath, new UsersController(new RequestAggregate())); }
public function testExceptionRenderCaseForbiddenException() { Configure::load('../app/config/test.config.php'); $this->expectOutputString('<div><h2>Forbidden</h2> </div> '); ErrorHandler::handleException(new ForbiddenException('error')); }
<?php use TRW\Core\Configure; use TRW\Router\Router; use TRW\ActiveRecord\BaseRecord; use TRW\ActiveRecord\Database\Driver\MySql; use TRW\Exception\ErrorHandler; //ini_set('display_errors',1); Configure::load(dirname(__FILE__) . '/config.php'); set_exception_handler('TRW\\Exception\\ErrorHandler::handleException'); BaseRecord::setConnection(new MySql(Configure::read('Database', 'MySql'))); Router::add('/', ['controller' => 'Pages', 'action' => 'index']);
public function setUp() { Configure::load('../app/config/config.php'); }
public function setUp() { Configure::load('../app/config/config.php'); BaseRecord::setConnection(new MySql(Configure::read('Database', 'MySql'))); }
public function setUp() { Configure::load('../app/config/config.php'); Router::clear(); }
public function testLoadAndRead() { Configure::load('../app/config/config.php'); $this->assertEquals('App', Configure::read('App', 'namespace')); }