如何使用 Zend Studio 创建 Zend 控制器测试用例?

发布于 2024-08-17 01:14:31 字数 237 浏览 5 评论 0原文

我想使用 Zend Studio 7.0 创建一个 Zend 控制器测试用例。

(来自 Zend 文档) “创建一个新的 Zend 控制器测试用例: 1. 在 PHP 资源管理器视图中,右键单击包含要测试的类的控制器文件,然后选择新建 | Zend 框架项目 | Zend 控制器测试用例。”

但我只能看到“Zend 控制器(基于模板)”和“Zend 控制器(基于 Zend 工具)”,没有“Zend 控制器测试用例”!

I want to create a Zend Controller Test Case with Zend Studio 7.0.

(from Zend documentation)
"To create a new Zend Controller Test Case:
1. In PHP Explorer view, right-click the Controller file containing the classes you would like to test and select New | Zend Framework Item | Zend Controller Test Case."

But I can see only "Zend Controller (Template Based)" and "Zend Controller (Zend Tool Based)", no "Zend Controller Test Case"!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜声 2024-08-24 01:14:32

您还可以在 PHP Explorer 窗口中单击,按 ctrl-2,这将打开 Zend_Tool 窗口,cd 进入项目并输入“zf create controller ”

You can also click in the PHP Explorer window, hit ctrl-2, which will open the Zend_Tool window, cd into the project and type "zf create controller "

记忆で 2024-08-24 01:14:31

我认为您正在寻找的是 PHPUnit 测试用例。

假设您的 Zend Studio 具有默认设置,要到达此位置,请按照以下步骤操作:

1. 右键单击​​控制器。

2.转到新建->其他->PHP->PHPUnit->PHPUnit测试用例。

I think what you looking for is a PHPUnit Test Case.

To get there assuming you have the default setting on your Zend Studio follow the following steps:

1.Right Click on the controller.

2.Go to New->Other->PHP->PHPUnit->PHPUnit Test Case.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文