【问题标题】:Kohana 3.14 fails at unit testing with message class 'Kohana' not foundKohana 3.14 在单元测试中失败,未找到消息类“Kohana”
【发布时间】:2012-01-09 15:47:30
【问题描述】:

我有一个运行良好的 kohana 网站,我开始了单元测试(回想起来,我知道这不是最佳实践)

我遇到的第一个错误是我无法摆脱的,这很令人费解:

致命错误:未捕获的异常“LogicException”,消息“已通过” 数组未指定现有的静态方法(类 'Kohana' 不 找到)'在 /Users/dananicula/Sites/mnib1/application/bootstrap.php:44

在引导程序中,第 44 行是:

 spl_autoload_register(array('Kohana', 'auto_load'));

并且类 Kohana 实际上存在于 system/classes/kohana.php 中

有什么提示吗?意见?建议? 谢谢!

【问题讨论】:

    标签: php unit-testing kohana kohana-3 spl-autoload-register


    【解决方案1】:

    似乎您在不加载 Kohana 核心类的情况下拥有自己的单元测试。使用本机 Unittest 模块,如 here 所述。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多