public function seeInSession($key, $value = null)
    {
        $this->debugSection('Session', json_encode($this->di['session']->toArray()));

        if (is_array($key)) {
            $this->seeSessionHasValues($key);
            return;
        }

        if (!$this->di['session']->has($key)) {
            $this->fail("No session variable with key '$key'");
        }

        if (is_null($value)) {
            $this->assertTrue($this->di['session']->has($key));
        } else {
            $this->assertEquals($value, $this->di['session']->get($key));
        }
    }
public function seeInSession($key, $value = null)
    {
        $this->debugSection('Session', json_encode($this->di['session']->toArray()));

        if (is_array($key)) {
            $this->seeSessionHasValues($key);
            return;
        }

        if (!$this->di['session']->has($key)) {
            $this->fail("No session variable with key '$key'");
        }

        if (is_null($value)) {
            $this->assertTrue($this->di['session']->has($key));
        } else {
            $this->assertEquals($value, $this->di['session']->get($key));
        }
    }
public function seeInSession ( $ key , $ value = null ) { $ this -> debugSection ( 'Session' , json_encode ( $ this -> di [ 'session' ] -> toArray ( ) ) ) ; if ( is_array ( $ key ) ) { $ this -> seeSessionHasValues ( $ key ) ; return ; } if ( ! $ this -> di [ 'session' ] -> has ( $ key ) ) { $ this -> fail ( "No session variable with key '$key'" ) ; } if ( is_null ( $ value ) ) { $ this -> assertTrue ( $ this -> di [ 'session' ] -> has ( $ key ) ) ; } else { $ this -> assertEquals ( $ value , $ this -> di [ 'session' ] -> get ( $ key ) ) ; } }
Checks that session contains value.
If value is `null` checks that session has key.

``` php
<?php
$I->seeInSession('key');
$I->seeInSession('key', 'value');
?>
```

@param string $key
@param mixed $value
Checks that session contains value . If value is null checks that session has key .