Наследование: extends Bolt\Configuration\Standard
Пример #1
0
 public function testCheckSummaryReportsError()
 {
     $config = new Composer(TEST_ROOT);
     $config->setPath('database', '/path/to/nowhere');
     $verifier = new ComposerChecks($config);
     $this->setExpectedException('Bolt\\Exception\\LowlevelException');
     $this->expectOutputRegex("/Bolt - Fatal Error/");
     $verifier->checkDir('/path/to/nowhere');
 }
Пример #2
0
 public function testCheckSummaryReportsError()
 {
     $config = new Composer(TEST_ROOT);
     $config->setPath('database', '/path/to/nowhere');
     $verifier = new ComposerChecks($config);
     try {
         $verifier->checkDir('/path/to/nowhere');
         $this->fail('Bolt\\Exception\\LowlevelException not thrown');
     } catch (LowlevelException $e) {
         $this->assertRegExp("/The default folder \\/path\\/to\\/nowhere doesn't exist/", $e->getMessage());
         $this->assertRegExp('/When using Bolt as a Composer package it will need to have access to the following folders/', $e->getMessage());
         $this->assertRegExp('/Bolt - Fatal Error/', $e::$screen);
     }
 }
 public function testComposerCustomConfig()
 {
     $config = new Composer(TEST_ROOT);
     $config->setPath('cache', 'app/cache');
     $config->setPath('database', 'app/database');
     $config->setPath('config', 'app/config');
     $app = new Application(array('resources' => $config));
     $this->assertEquals(TEST_ROOT . "/vendor/bolt/bolt/app", $config->getPath("app"));
     $this->assertEquals(TEST_ROOT . "/vendor/bolt/bolt/app/extensions", $config->getPath("extensions"));
     $this->assertEquals("/bolt-public/", $config->getUrl("app"));
 }
Пример #4
0
 public function testComposerCustomConfig()
 {
     $config = new Composer($this->loader);
     $config->compat();
     $app = new Application(array('resources' => $config));
     $this->assertEquals("/bolt-public/", $config->getUrl("app"));
 }