Illuminate\Foundation\Testing\Concerns\InteractsWithSession::session PHP Method

session() public method

Set the session to the given array.
public session ( array $data )
$data array
    public function session(array $data)
    {
        $this->startSession();
        foreach ($data as $key => $value) {
            $this->app['session']->put($key, $value);
        }
        return $this;
    }