Example #1
0
     *
     * @link   http://php.net/manual/en/function.trigger-error.php
     * @return bool
     */
    function phpNotice($msg)
    {
        return trigger_error($msg, E_USER_NOTICE);
    }
    /**
     * Triggers a PHP-level error with the level E_USER_DEPRECATED
     *
     * @author Art <*****@*****.**>
     *
     * @param string $msg Error message
     *
     * @link   http://php.net/manual/en/function.trigger-error.php
     * @return bool
     */
    function phpDeprecated($msg)
    {
        return trigger_error($msg, E_USER_DEPRECATED);
    }
    require_once DIR_SYS . 'core' . DIRECTORY_SEPARATOR . 'alo.php';
    if (!defined('PHPUNIT_RUNNING')) {
        Alo::$router = new Alo\Controller\Router();
        Alo::includeonceifexists(DIR_APP . 'core' . DIRECTORY_SEPARATOR . 'autoload.php');
        Alo::$router->init();
    } else {
        Alo::includeonceifexists(DIR_APP . 'core' . DIRECTORY_SEPARATOR . 'autoload.php');
    }
}
Example #2
0
 */
function _unit_dump($data)
{
    ob_start();
    var_dump($data);
    return ob_get_clean();
}
// ========== Autoload classes ==========
_load_classes(DIR_SYS . 'core');
_load_classes(DIR_SYS . 'class');
_load_classes(DIR_APP . 'class');
_load_classes(DIR_APP . 'interface');
_load_classes(DIR_APP . 'traits');
Alo::$router = new \Alo\Controller\Router();
ob_clean();
Alo::includeonceifexists(__DIR__ . '/vendor/autoload.php');
error_reporting(E_ALL);
/** @var array $runThisSQL The SQL in this array will be executed once the PHPUnit MySQL instance is up */
$runThisSQL = ['CREATE TABLE IF NOT EXISTS `alo_session` (`id`     CHAR(128)
           CHARACTER SET `ascii` NOT NULL,
  `data`   VARCHAR(16000)      NOT NULL,
  `access` TIMESTAMP           NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `access` (`access`)
)
  ENGINE =InnoDB
  DEFAULT CHARSET =`utf8mb4`;', 'CREATE TABLE IF NOT EXISTS `alo_locale` (
	`id`    INT UNSIGNED                 NOT NULL AUTO_INCREMENT,
	`lang`  CHAR(2)
	        COLLATE `ascii_general_ci`   NOT NULL,
	`page`  VARCHAR(25)