Last active
January 6, 2018 11:55
-
-
Save leavyli/a3dc174e8415074197d9e4e5d714f1aa to your computer and use it in GitHub Desktop.
Yii2:unit:_bootstrap.php:用于单元测试的时候配置命名空间,从而可以加载对应的类
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment