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
namespace App\Controllers\Admin;
use CodeIgniter\Test\FeatureTestCase;
class AdminUserTest extends FeatureTestCase {
public function setUp(): void {
parent::setUp();
}
public function tearDown(): void {
parent::tearDown();
}
public function testIndexWithPerm() {
$values = [
'id' => 42,
'permission_ids' => [
44
]
];
$result = $this->withSession($values)->get('admin/user');
$result->assertOK();
}
}
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?