Zend_Test_PHPUnit_ControllerTestCase 的文本字段的值

发布于 2024-11-07 08:54:38 字数 129 浏览 6 评论 0原文

任何人都可以建议使用 Zend_Test_PHPUnit_ControllerTestCase 检索和检查文本字段的值的正确方法吗?断言条件对于 css 选择器来说很好,但我看不到检查文本字段或其他表单元素是否正确填充的方法?任何线索非常感谢!

Could anyone advice on the correct way to retrieve and check the value of a textfield with Zend_Test_PHPUnit_ControllerTestCase? The assert conditions are fine for css selectors, but I cannot see a way of checking that a textfield or other form element is correctly populated? any clues much appreciated!

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

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

发布评论

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

评论(1

黎夕旧梦 2024-11-14 08:54:38

您应该使用 Zend_Validate 验证数据输入(这是生产代码的一部分) )。然后,您可以对值存储在数据库中后是否正确检索进行单元测试。

you should validate data entry with Zend_Validate (which is part of the production code). you then would unit test that the value is retrieved correctly after it was stored in the DB.

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