public function __construct() { $application = new Application(); $application->setConfigDir(dirname(__DIR__) . '/Config/'); $this->mock = $this->getMockForTrait('Tiimber\\Traits\\RouteResolverTrait'); $this->routes = Config::get('routes'); }
public function render() { $routes = Config::get('routes'); $route = $routes->get($this->key, (object) ['route' => ''])->route; $route = explode('::', $route); $route = end($route); return $this->hydrateRoute($route); }
/** * Slugify text by removing non ASCII carac * * @param $text String to slugify * @return Sting */ public static function bcrypt(string $password) : string { return password_hash($password, PASSWORD_BCRYPT, ['salt' => Config::get('security', new ParameterBag())->get('salt', null)]); }
public function testNonExistentConfig() { $this->assertTrue(Config::get('undefined', true)); $this->assertNull(Config::get('undefined')); }