src/Concerns/InteractsWithSession.php
public function assertSessionHasErrors($bindings = [], $format = null)
    {
        $this->assertSessionHas('errors');

        $bindings = (array) $bindings;

        $errors = $this->app['session.store']->get('errors');

        foreach ($bindings as $key => $value) {
            if (is_int($key)) {
                PHPUnit::assertTrue($errors->has($value), "Session missing error: $value");
            } else {
                PHPUnit::assertContains($value, $errors->get($key, $format));
            }
        }
    }
public function assertSessionHasErrors($bindings = [], $format = null)
    {
        $this->assertSessionHas('errors');

        $bindings = (array) $bindings;

        $errors = $this->app['session.store']->get('errors');

        foreach ($bindings as $key => $value) {
            if (is_int($key)) {
                PHPUnit::assertTrue($errors->has($value), "Session missing error: $value");
            } else {
                PHPUnit::assertContains($value, $errors->get($key, $format));
            }
        }
    }
public function assertSessionHasErrors ( $ bindings = [ ] , $ format = null ) { $ this -> assertSessionHas ( 'errors' ) ; $ bindings = ( array ) $ bindings ; $ errors = $ this -> app [ 'session.store' ] -> get ( 'errors' ) ; foreach ( $ bindings as $ key => $ value ) { if ( is_int ( $ key ) ) { PHPUnit :: assertTrue ( $ errors -> has ( $ value ) , "Session missing error: $value" ) ; } else { PHPUnit :: assertContains ( $ value , $ errors -> get ( $ key , $ format ) ) ; } } }
Assert that the session has errors bound.

@param  string|array  $bindings
@param  mixed  $format
@return void
Assert that the session has errors bound .