<?php require_once __DIR__ . "/../src/bolt.php"; date_default_timezone_set('UTC'); define("VENDOR_DIR", realpath(__DIR__ . "/../vendor/")); define("MOCK_DIR", realpath(__DIR__ . "/mock")); // for some reason travis-ci has problems // autoloading this file. so we'll manually // include it to pull it into require VENDOR_DIR . "/leafo/lessphp/lessc.inc.php"; class Test extends PHPUnit_Framework_TestCase { } bolt::init([]);
/** * include our vendor autoload * provided by composer */ require __DIR__ . "/../vendor/autoload.php"; /** * inialize our bolt instance * * @var $env string environment name * @var $root root source directory to load resources from * all paths are considered relative to this * * @return \bolt\application */ $bolt = bolt::init(['env' => 'dev', 'root' => __DIR__, 'bootstrap' => __DIR__ . '/bootstrap']); /** * Plugin our http (http) class * * you can access this plugin by using * $bolt['http'] * */ $bolt->plug('http', 'bolt\\http'); /** * Plugin the components we need for * our http instance */ $bolt['http']->plug([['assets', 'bolt\\http\\assets', ['root' => 'assets', 'path' => '/a/{path}', 'filters' => ['css' => [new Assetic\Filter\LessphpFilter()]], 'ready' => function ($assets) { $assets->set('app', $assets->collection([new Assetic\Asset\HttpAsset('http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css'), new Assetic\Asset\HttpAsset('http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css'), $assets->glob('css/*css')])); }]], ['router', 'bolt\\http\\router'], ['views', 'bolt\\http\\views', ['dirs' => ['views'], 'engines' => [['hbr', 'bolt\\render\\handlebars']]]]]);