コード例 #1
0
ファイル: Laravel4.php プロジェクト: NaszvadiG/ImageCMS
 public function _initialize()
 {
     $projectDir = \Codeception\Configuration::projectDir();
     require $projectDir . '/vendor/autoload.php';
     \Illuminate\Support\ClassLoader::register();
     if (is_dir($workbench = $projectDir . 'workbench')) {
         \Illuminate\Workbench\Starter::start($workbench);
     }
     $unitTesting = true;
     $testEnvironment = 'testing';
     $app = (require $projectDir . 'bootstrap/start.php');
     $this->kernel = $app;
     $this->revertErrorHandler();
 }
コード例 #2
0
 public function develop()
 {
     if ($this->app->environment('production')) {
         return;
     }
     $this->app->register('Clockwork\\Support\\Laravel\\ClockworkServiceProvider');
     $this->app->register('Illuminate\\Workbench\\WorkbenchServiceProvider');
     if (is_dir($workbench = base_path() . '/workbench')) {
         Starter::start($workbench);
     }
     if (is_file(base_path() . '/.workbench.php')) {
         include base_path() . '/.workbench.php';
     }
 }
コード例 #3
0
ファイル: Laravel4.php プロジェクト: lenninsanchez/donadores
 public function _initialize()
 {
     $projectDir = \Codeception\Configuration::projectDir();
     require $projectDir . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
     \Illuminate\Support\ClassLoader::register();
     if (is_dir($workbench = $projectDir . 'workbench')) {
         \Illuminate\Workbench\Starter::start($workbench);
     }
     $unitTesting = true;
     $testEnvironment = 'testing';
     $startFile = $projectDir . $this->config['start'];
     if (!file_exists($startFile)) {
         throw new ModuleConfig($this, "Laravel start.php file not found in {$startFile}.\nPlease provide a valid path to it using 'start' config param. ");
     }
     $app = (require $startFile);
     $app->boot();
     $this->kernel = $app;
     $this->revertErrorHandler();
 }
コード例 #4
0
ファイル: Laravel4.php プロジェクト: Marfuz/c4t_test
 /**
  * Register Laravel autoloaders.
  */
 protected function registerAutoloaders()
 {
     require $this->config['project_dir'] . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
     ClassLoader::register();
     if (is_dir($workbench = $this->config['project_dir'] . 'workbench')) {
         Starter::start($workbench);
     }
 }
コード例 #5
0
ファイル: Laravel4.php プロジェクト: Eli-TW/Codeception
 /**
  * @return \Illuminate\Foundation\Application
  * @throws \Codeception\Exception\ModuleConfig
  */
 protected function getApplication()
 {
     $projectDir = explode('workbench', \Codeception\Configuration::projectDir())[0];
     $projectDir .= $this->config['root'];
     require $projectDir . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
     \Illuminate\Support\ClassLoader::register();
     if (is_dir($workbench = $projectDir . 'workbench')) {
         \Illuminate\Workbench\Starter::start($workbench);
     }
     $startFile = $projectDir . $this->config['start'];
     if (!file_exists($startFile)) {
         throw new ModuleConfig($this, "Laravel start.php file not found in {$startFile}.\nPlease provide a valid path to it using 'start' config param. ");
     }
     $unitTesting = $this->config['unit'];
     $testEnvironment = $this->config['environment'];
     $app = (require $startFile);
     return $app;
 }
コード例 #6
0
|
| The Patchwork library provides solid handling of UTF-8 strings as well
| as provides replacements for all mb_* and iconv type functions that
| are not available by default in PHP. We'll setup this stuff here.
|
*/
\Patchwork\Utf8\Bootup::initMbstring();
/*
|--------------------------------------------------------------------------
| Register The Laravel Auto Loader
|--------------------------------------------------------------------------
|
| We register an auto-loader "behind" the Composer loader that can load
| model classes on the fly, even if the autoload files have not been
| regenerated for the application. We'll add it to the stack here.
|
*/
\Illuminate\Support\ClassLoader::register();
/*
|--------------------------------------------------------------------------
| Register The Workbench Loaders
|--------------------------------------------------------------------------
|
| The Laravel workbench provides a convenient place to develop packages
| when working locally. However we will need to load in the Composer
| auto-load files for the packages so that these can be used here.
|
*/
if (is_dir($workbench = __DIR__ . '/../workbench')) {
    \Illuminate\Workbench\Starter::start($workbench);
}