未生成 Netbeans PHPUnit 测试
当尝试为带有类的文件创建测试时,出现以下错误:
Tests were not generated for the following files:
myclass.php
Review the log in Output windows
查看输出时:
Restricted access
未创建测试类文件,但创建了目录树。
我注意到这种情况发生在扩展另一个类的类中。对于没有扩展的类,可以正确创建测试文件。
When trying to create a test for a file with a class, I get the following error:
Tests were not generated for the following files:
myclass.php
Review the log in Output windows
When looking at Output:
Restricted access
The test class file is not created but the directory tree is.
I have noticed this happens with classes that extend another class. With classes with no extend, the test file is correctly created.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查文件/项目属性/测试文件夹设置是否正确。
Check if File / Project Properties/ Test Folder is set correctly.
您正在 Joomla 中测试某些内容吗?当未定义 _JEXEC 时,Joomla 似乎说“限制访问”。
尝试将其放在引导文件的顶部
Are you testing something inside Joomla? It seems the "restricted access" that Joomla says when the _JEXEC is not defined.
Try to put this on top of your bootstrap file