![]() |
HTTP Feature Testing : don't echo the output - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: HTTP Feature Testing : don't echo the output (/showthread.php?tid=78213) |
HTTP Feature Testing : don't echo the output - ViLar - 12-15-2020 Hello, I'm trying to implement some UnitTest on a CI4 application but I encountered a problem with the HTTP Feature Testing. Whenever I test that one of my page is correctly responding, it dump all of my page content for the test that meet all requirement. I have this test : PHP Code: <?php What I want is checking that the page is responding correctly (HTTP 200) and that there's a body in it BUT without printing its content. Is it doable? RE: HTTP Feature Testing : don't echo the output - kenjis - 12-15-2020 How about this? $result->assertStatus(200); $result->assertSee('<title>Welcome to CodeIgniter 4!</title>'); |