为了账号安全,请及时绑定邮箱和手机立即绑定

如何显示多个foreach?

如何显示多个foreach?

PHP
慕仙森 2021-06-30 09:07:27
我是 phpUnit 的新手,我的项目在 codeigniter 中,我使用的是 netbeans IDE 8.2,我的操作系统是 windows10,我正在尝试测试我的网站,现在我遇到了如何测试我的登录页面的问题?我在下面的代码中尝试过:class Welcome_test extends TestCase{    public function addDataProvider(){        return array(array('email'=>'abc@gmail.com','pass'=>'cdef'));     }    /*** @dataProvider addDataProvider*/    public function test_login(){        $output = $this->post('Login/submitlogin');        $this->assertContains('<span class="title">Product List</span>',$output);    }}我期待结果应该通过,但不幸的是我收到了这个错误Welcome_test::test_login()PHP 发生致命错误。PHP 发生致命错误,测试结果可能不完整!查看完整输出的输出窗口。
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 123 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信