InteractsWithSession (Foundation\Testing)

InteractsWithSession

trait InteractsWithSession (View source)

Methods

$this withSession(array $data)

Set the session to the given array.

$this session(array $data)

Set the session to the given array.

$this flushSession()

Flush all of the current session data.

$this seeInSession(string|array $key, mixed $value = null)

Assert that the session has a given value.

$this assertSessionHas(string|array $key, mixed $value = null)

Assert that the session has a given value.

$this assertSessionHasAll(array $bindings)

Assert that the session has a given list of values.

$this assertSessionMissing(string|array $key)

Assert that the session does not have a given key.

$this assertSessionHasErrors(string|array $bindings = array(), mixed $format = null)

Assert that the session has errors bound.

$this assertHasOldInput()

Assert that the session has old input.

Details

$this withSession(array $data)

Set the session to the given array.

Parameters

array $data

Return Value

$this

$this session(array $data)

Set the session to the given array.

Parameters

array $data

Return Value

$this

$this flushSession()

Flush all of the current session data.

Return Value

$this

$this seeInSession(string|array $key, mixed $value = null)

Assert that the session has a given value.

Parameters

string|array $key
mixed $value

Return Value

$this

$this assertSessionHas(string|array $key, mixed $value = null)

Assert that the session has a given value.

Parameters

string|array $key
mixed $value

Return Value

$this

$this assertSessionHasAll(array $bindings)

Assert that the session has a given list of values.

Parameters

array $bindings

Return Value

$this

$this assertSessionMissing(string|array $key)

Assert that the session does not have a given key.

Parameters

string|array $key

Return Value

$this

$this assertSessionHasErrors(string|array $bindings = array(), mixed $format = null)

Assert that the session has errors bound.

Parameters

string|array $bindings
mixed $format

Return Value

$this

$this assertHasOldInput()

Assert that the session has old input.

Return Value

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部