public static function createWebApplication($config = null) { if ($config !== null) { self::$config = $config; } spl_autoload_register(array('WUnit', 'autoload')); $basePath = dirname(__FILE__); require_once $basePath . '/Http/YiiExitException.php'; require_once $basePath . '/Http/YiiApplication.php'; require_once $basePath . '/UploadedFile.php'; if (!defined('_PHP_INSULATE_')) { require_once $basePath . '/PHPUnit/ResultPrinter.php'; } return new YiiApplication(self::$config); }
<?php error_reporting(E_ALL | E_STRICT); require dirname(__FILE__) . '/../../../../../framework/yiit.php'; require dirname(__FILE__) . '/../WUnit.php'; WUnit::createWebApplication(require dirname(__FILE__) . '/fixtures/config/main.php');
<?php // change the following paths if necessary $yiit = dirname(__FILE__) . '/../../../framework/yiit.php'; $config = dirname(__FILE__) . '/../config/test.php'; require_once $yiit; require_once dirname(__FILE__) . '/WebTestCase.php'; require dirname(__FILE__) . '/../extensions/wunit/WUnit.php'; WUnit::createWebApplication($config); //Yii::createWebApplication($config);