Zend_Test_PHPUnit_ControllerTestCase 的文本字段的值
任何人都可以建议使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用 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.