src/Concerns/InteractsWithSession.php
public function assertSessionHas($key, $value = null)
    {
        if (is_array($key)) {
            return $this->assertSessionHasAll($key);
        }

        if (is_null($value)) {
            PHPUnit::assertTrue($this->app['session.store']->has($key), "Session missing key: $key");
        } else {
            PHPUnit::assertEquals($value, $this->app['session.store']->get($key));
        }
    }
public function assertSessionHas($key, $value = null)
    {
        if (is_array($key)) {
            return $this->assertSessionHasAll($key);
        }

        if (is_null($value)) {
            PHPUnit::assertTrue($this->app['session.store']->has($key), "Session missing key: $key");
        } else {
            PHPUnit::assertEquals($value, $this->app['session.store']->get($key));
        }
    }
public function assertSessionHas ( $ key , $ value = null ) { if ( is_array ( $ key ) ) { return $ this -> assertSessionHasAll ( $ key ) ; } if ( is_null ( $ value ) ) { PHPUnit :: assertTrue ( $ this -> app [ 'session.store' ] -> has ( $ key ) , "Session missing key: $key" ) ; } else { PHPUnit :: assertEquals ( $ value , $ this -> app [ 'session.store' ] -> get ( $ key ) ) ; } }
Assert that the session has a given value.

@param  string|array  $key
@param  mixed  $value
@return void
Assert that the session has a given value .