Skip to content

Instantly share code, notes, and snippets.

@leavyli
Last active January 6, 2018 11:55
Show Gist options
  • Save leavyli/a3dc174e8415074197d9e4e5d714f1aa to your computer and use it in GitHub Desktop.
Save leavyli/a3dc174e8415074197d9e4e5d714f1aa to your computer and use it in GitHub Desktop.

Revisions

  1. leavyli revised this gist Jan 6, 2018. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions _bootstrap.php
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    <?php
    define('YII_ENV', 'test');
    defined('YII_DEBUG') or define('YII_DEBUG', true);

    require_once __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
    require __DIR__ .'/../vendor/autoload.php';
    // add unit testing specific bootstrap code here
    $classLoader = new \Composer\Autoload\ClassLoader();

    $classLoader->addPsr4("tests\\components\\", __DIR__ . "/components", false);
    $classLoader->addPsr4("tests\\models\\", __DIR__ . "/models", false);
    $classLoader->register();
  2. leavyli revised this gist Jan 6, 2018. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions _bootstrap.php
    Original file line number Diff line number Diff line change
    @@ -1 +1,6 @@
    <?php
    define('YII_ENV', 'test');
    defined('YII_DEBUG') or define('YII_DEBUG', true);

    require_once __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
    require __DIR__ .'/../vendor/autoload.php';
  3. leavyli revised this gist Jan 6, 2018. 1 changed file with 0 additions and 7 deletions.
    7 changes: 0 additions & 7 deletions _bootstrap.php
    Original file line number Diff line number Diff line change
    @@ -1,8 +1 @@
    <?php

    // add unit testing specific bootstrap code here
    $classLoader = new \Composer\Autoload\ClassLoader();

    $classLoader->addPsr4("tests\\components\\", __DIR__ . "/components", false);
    $classLoader->addPsr4("tests\\models\\", __DIR__ . "/models", false);
    $classLoader->register();
  4. leavyli revised this gist Jan 6, 2018. No changes.
  5. leavyli revised this gist Jan 6, 2018. No changes.
  6. leavyli revised this gist Jan 6, 2018. No changes.
  7. leavyli created this gist Jan 6, 2018.
    8 changes: 8 additions & 0 deletions _bootstrap.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    <?php

    // add unit testing specific bootstrap code here
    $classLoader = new \Composer\Autoload\ClassLoader();

    $classLoader->addPsr4("tests\\components\\", __DIR__ . "/components", false);
    $classLoader->addPsr4("tests\\models\\", __DIR__ . "/models", false);
    $classLoader->register();