You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
816 B
33 lines
816 B
<?php |
|
|
|
namespace yiiunit\extensions\authclient; |
|
|
|
use yii\helpers\FileHelper; |
|
use Yii; |
|
|
|
/** |
|
* TestCase for "authclient" extension. |
|
*/ |
|
class TestCase extends \yiiunit\TestCase |
|
{ |
|
public static function setUpBeforeClass() |
|
{ |
|
static::loadClassMap(); |
|
} |
|
|
|
/** |
|
* Adds sphinx extension files to [[Yii::$classPath]], |
|
* avoiding the necessity of usage Composer autoloader. |
|
*/ |
|
protected static function loadClassMap() |
|
{ |
|
$baseNameSpace = 'yii/authclient'; |
|
$basePath = realpath(__DIR__. '/../../../../extensions/yii/authclient'); |
|
$files = FileHelper::findFiles($basePath); |
|
foreach ($files as $file) { |
|
$classRelativePath = str_replace($basePath, '', $file); |
|
$classFullName = str_replace(['/', '.php'], ['\\', ''], $baseNameSpace . $classRelativePath); |
|
Yii::$classMap[$classFullName] = $file; |
|
} |
|
} |
|
} |