Codeception / Codeception/AspectMock
Class 'yii\base\UnknownClassException' not found
- Lenguaje dominante
- PHP
- Estrellas
- 784
- Forks
- 132
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
While using `AspectMock` for unit testing, the `autoload` method in `BaseYii.php` can not find the following class:
> Class 'yii\base\UnknownClassException' not found
However tests are passing successfully.
```
public static function autoload($className)
{
if (isset(static::$classMap[$className])) {
$classFile = static::$classMap[$className];
if ($classFile[0] === '@') {
$classFile = static::getAlias($classFile);
}
} elseif (strpos($className, '\\') !== false) {
$classFile = static::getAlias('@' . str_replace('\\', '/', $className) . '.php', false);
if ($classFile === false || !is_file($classFile)) {
return;
}
} else {
return;
}
include $classFile;
if (YII_DEBUG && !class_exists($className, false) && !interface_exists($className, false) && !trait_exists($className, false)) {
throw new UnknownClassException("Unable to find '$className' in file: $classFile. Namespace missing?"); // <---
}
}
```
[Test snapshot](https://www.screencast.com/t/1suVpY4O1bj)
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.