PHP Trait Illuminate\Foundation\Testing\Concerns\InteractsWithSession

Show file Open project: laravel/framework

Public Methods

Method Description
assertHasOldInput ( ) Assert that the session has old input.
assertSessionHas ( string | array $key, mixed $value = null ) Assert that the session has a given value.
assertSessionHasAll ( array $bindings ) Assert that the session has a given list of values.
assertSessionHasErrors ( string | array $bindings = [], mixed $format = null ) Assert that the session has errors bound.
assertSessionMissing ( string | array $key ) Assert that the session does not have a given key.
flushSession ( ) Flush all of the current session data.
seeInSession ( string | array $key, mixed $value = null ) Assert that the session has a given value.
session ( array $data ) Set the session to the given array.
withSession ( array $data ) Set the session to the given array.

Protected Methods

Method Description
startSession ( ) Start the session for the application.

Method Details

assertHasOldInput() public method

Assert that the session has old input.
public assertHasOldInput ( )

assertSessionHas() public method

Assert that the session has a given value.
public assertSessionHas ( string | array $key, mixed $value = null )
$key string | array
$value mixed

assertSessionHasAll() public method

Assert that the session has a given list of values.
public assertSessionHasAll ( array $bindings )
$bindings array

assertSessionHasErrors() public method

Assert that the session has errors bound.
public assertSessionHasErrors ( string | array $bindings = [], mixed $format = null )
$bindings string | array
$format mixed

assertSessionMissing() public method

Assert that the session does not have a given key.
public assertSessionMissing ( string | array $key )
$key string | array

flushSession() public method

Flush all of the current session data.
public flushSession ( )

seeInSession() public method

Assert that the session has a given value.
public seeInSession ( string | array $key, mixed $value = null )
$key string | array
$value mixed

session() public method

Set the session to the given array.
public session ( array $data )
$data array

startSession() protected method

Start the session for the application.
protected startSession ( )

withSession() public method

Set the session to the given array.
public withSession ( array $data )
$data array