php - The phalcon app failed when running the codeception tests
问题描述
According to the instructions, he created a bootstrap phalcon-project, added it to the modules
I run the code codecept run functional -d
At start of functional tests there is an error:
PHP Fatal error: Cannot declare class phpMorphy_Exception, because the name is already in use in /home/hyber/test/backend/library/library/Service/phpmorphy/src/common.php on line 35
functional.suite.yml:
actor: FunctionalTester
modules:
enabled:
- Phalcon:
bootstrap: 'config/bootstrap.php'
cleanup: true
savepoints: true
- Asserts
# add a framework module here
- \Helper\Functional
config/bootstrap.php:
error_reporting(E_ALL);
try {
$config = include __DIR__ . "/config.php";
include __DIR__ . "/loader.php";
$di = new \Phalcon\DI\FactoryDefault();
include __DIR__ . "/services.php";
return new \Phalcon\Mvc\Application($di);
} catch (\Phalcon\Exception $e) {
echo $e->getMessage();
} catch (PDOException $e){
echo $e->getMessage();
}
help me please!
解决方案
phpMorphy_Exception 可能在测试引导和框架中都被声明了两次。
推荐阅读
- java - 如何使用 PHP/Java Bridge 在 Web 浏览器中显示 Jasper 报告?
- c# - 指数数组的边界之外。使用 EP Plus
- windows - 如何在 Windows 下打包 Vala 应用程序?
- python-3.x - 如何使用python从句子中找到医学单词?
- php - 致命错误:在 Cakephp 中找不到接口“JsonSerializable”
- c# - 在我的 .Net 框架应用程序中,“startup.cs”(.Net Core)的等价物是什么?
- php - 我从 youtube-api 收到“500 后端错误”和“400 无效元数据”
- javascript - 通过 JavaScript 使用 Canvas,如何在 Y 参数内绘制 X 次图片?
- java - CompletableFuture join() 导致主线程挂起
- java - 针对特定表格布局裁剪单元格数据。iText 2.1.7