douhang5493 2018-06-21 11:46
浏览 114

运行代码测试时,phalcon应用程序失败

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!

  • 写回答

1条回答 默认 最新

  • douxie4583 2018-06-23 02:00
    关注

    phpMorphy_Exception is getting declared twice maybe in both the test bootstrapping and the frameworks.

    评论

报告相同问题?

悬赏问题

  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败