I am getting this error in my log file when I run codeception test case. How to fix this?
Code:
public function testUpdatePhone(FunctionalTester $I)
{
$I->wantTo('Test update phone');
$I->sendPUT('/admin/phone/100', [
'label' => 'My new label'
]);
$I->see('Phone Number updated successfully.');
}
Command:
./vendor/bin/codecept run tests/functional/AdminPhoneTestCest.php:testUpdatePhone
Error in Log file:
[2015-06-06 05:34:02] local.ERROR: exception 'Illuminate\Session\TokenMismatchException' in /var/www/xxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:46
Thanks in advance :)
_tokenform field which the middleware in your error is expecting. This field has to be generated for each request, or it will fail authentication. You'll want to search for a work around. - Azeame