Author: Christer Edvartsen (cogo@starzinger.net)
Ejemplo n.º 1
0
 /**
  * @covers Imbo\Application::run
  */
 public function testCanRunWithDefaultConfiguration()
 {
     $this->expectOutputRegex('|{"version":"' . preg_quote(Version::VERSION, '|') . '",.*}|');
     $this->application->run(require __DIR__ . '/../../../config/config.default.php');
 }
Ejemplo n.º 2
0
Archivo: index.php Proyecto: ASP96/imbo
<?php

/**
 * This file is part of the Imbo package
 *
 * (c) Christer Edvartsen <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE file that was
 * distributed with this source code.
 */
namespace Imbo;

use Exception as BaseException;
try {
    // Fetch the configuration
    $configPath = defined('IMBO_CONFIG_PATH') ? IMBO_CONFIG_PATH : __DIR__ . '/../config/config.default.php';
    $config = (require $configPath);
    $application = new Application();
    $application->run($config);
} catch (BaseException $e) {
    header('HTTP/1.1 500 Internal Server Error');
    trigger_error('Uncaught Exception with message: ' . $e->getMessage(), E_USER_ERROR);
}