namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreAccount extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'account_name' => 'required|max:100',
'street' => 'required|max:100',
'suite' => 'required|max:20',
'city' => 'required|max:50',
'state' => 'required|max:2',
'zip_code' => 'required|alpha_dash|max:10',
'name' => 'required|max:50',
'lastname' => 'required|max:50',
'email' => 'required|email|max:100|unique:users,email',
'password' => 'required|nullable|between:8,30|confirmed',
'password_confirmation' => 'required',
'recaptcha' => 'required|captcha',
'privacy_and_terms' => 'required|accepted',
];
}
}
When I run in my console vendor/bin/phpunit I have the following error.
PHPUnit 7.3.1 by Sebastian Bergmann and contributors.
E 1 / 1 (100%)
Time: 4.67 seconds, Memory: 12.00MB
There was 1 error:
1) Tests\Feature\RegisterTest::testBasicTest
Error: Class 'Tests\Feature\NoCaptcha' not found
/Users/Digizent/Documents/Code/flexformz/tests/Feature/RegisterTest.php:19
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
I have installed the latest version of the package and I added the Facade to the config\app.php, I'm using Laravel 5.6.
I'm I missing something or do I need to change the code?
Hello! I'm having an issue when trying to create a test for an account creation that has the captcha.
RegisterTest.php
I have a Form Request.
StoreAccount.php
When I run in my console
vendor/bin/phpunit
I have the following error.I have installed the latest version of the package and I added the Facade to the config\app.php, I'm using Laravel 5.6.
I'm I missing something or do I need to change the code?
Thank you for your help. LLAP 🖖