【问题标题】:Php Unit Testing: How do i access find() and get() in testControllerPHP 单元测试:我如何在 testController 中访问 find() 和 get()
【发布时间】:2017-06-27 07:11:39
【问题描述】:

我可以在tableTest.php 中访问find() 和get(),但不能在ControllerTest.php 中访问它。我如何在 cakephp3 中获得访问权限?

【问题讨论】:

标签: phpunit cakephp-3.0


【解决方案1】:

在setUp()函数中使用TableRegistry::get(TableName)排序

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-21
    • 1970-01-01
    • 1970-01-01
    • 2011-06-26
    • 1970-01-01
    相关资源
    最近更新 更多