Support the ongoing development of Laravel.io →
Requests Eloquent Testing

So I am using laravel 5 form testing for my register pages which are split into 3 stages doing something like:

$this->visit('register/step-1')
		     ->type($user->email, 'email')
		     ->type($user->password, 'password')
		     ->type($user->password, 'password_confirmation')
             ->check('terms')
		     ->press('submit')
		     ->type($user->first_name, 'first_name')
		     ->type($user->last_name,  'last_name')
             ->press('submit')
             ->click('Skip')
             ->see(\Config::get('constants.success.user_registered'));

the first submit press passes because in the backend I am doing something like

User::create([
  'email' => request->email  //pardon the incorrect code
])

for second stage.. i am doing

$user_id = get id from session (basically the id created from first call above)

// find the user

User::update($request->all()); // this gives error

The error i get is "no such column: submit"..

But this is all working if i fill in the register steps 1 & 2 manually by going to the URL..

this is obv because i am doing request->all() when i remove submit from that array it works...

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

shez1983 shez1983 Joined 31 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.