本文整理汇总了PHP中ControllerTestCase::appInit方法的典型用法代码示例。如果您正苦于以下问题:PHP ControllerTestCase::appInit方法的具体用法?PHP ControllerTestCase::appInit怎么用?PHP ControllerTestCase::appInit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControllerTestCase
的用法示例。
在下文中一共展示了ControllerTestCase::appInit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ini_set
<?php
ini_set("memory_limit", "512M");
date_default_timezone_set('Europe/Kiev');
defined('PHPUNIT') || define('PHPUNIT', true);
// Define path to application directory
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
// Define path to logs directory
defined('LOGS_PATH') || define('LOGS_PATH', realpath(dirname(__FILE__) . '/../data/logs'));
// Define application environment
defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing');
// Define path to public directory
defined('PUBLIC_PATH') || define('PUBLIC_PATH', APPLICATION_PATH . '/../public/');
// Define short alias for DIRECTORY_SEPARATOR
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
// Define short alias for DIRECTORY_SEPARATOR
defined('START_TIMER') || define('START_TIMER', microtime(true));
$_SERVER['HTTP_HOST'] = 'localhost';
$_SERVER['REQUEST_URI'] = '/';
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . '/../library'), realpath(APPLICATION_PATH . '/../vendor'), get_include_path())));
//For Composer
require_once APPLICATION_PATH . '/../vendor/autoload.php';
require_once 'ControllerTestCase.php';
require_once 'TestListener.php';
ControllerTestCase::appInit();