I have enabled:
$this->loadComponent('FormProtection');
If run test, then get error:
Possibly related to `Cake\Http\Exception\BadRequestException`: "`_Token` was not found in request data."
Test
public function testCsrfAppliedOk()
{
$this->enableCsrfToken();
$this->post('/', ['hello' => 'world']);
$this->assertThat(403, $this->logicalNot(new StatusCode($this->_response)));
$this->assertResponseNotContains('CSRF');
}
How to write a test in such a case if I have active FormProtection?
Thank You