function testSmoke() { //Load project config //TODO: Change to test config (?) $config = new Example_Config(); //Check Starch and Request $this->assertTrue(new Starch()); $this->assertTrue(new Starch_Request()); //Check set config staic call Starch::setConfig($config); $this->assertEqual(Starch::getConfig(), $config); //Start the router instance $this->assertTrue(Starch_Router::getInstance()); //Check Route class $url_array = array('/', '/system/test/test_app.php', 'test_app', 'test_method', ''); $this->assertTrue(new Starch_Route($url_array)); }
public function getStarchConfig() { return Starch::getConfig(); }
/** * Sets the config for the class */ public function setConfig(Starch_Config $config) { self::$_config = $config; }
<?php /** * @package StarchMVC * @author Brian Macdonald <*****@*****.**> * @copyright Copyright (c) 2009, Brian Macdonald * @license http://opensource.org/licenses/gpl-license.php GNU Public License */ //Base directory define("BASE_DIR", dirname(__FILE__)); //Framework require_once BASE_DIR . '/system/Starch.php'; //Your config file require_once BASE_DIR . '/config.php'; //create configuration object $config = new Example_Config(); /** * Starts the framework with configuration. */ Starch::run($config);