diff --git a/src/Codeception/Module/Symfony.php b/src/Codeception/Module/Symfony.php index c228fe78..52eb7e0b 100644 --- a/src/Codeception/Module/Symfony.php +++ b/src/Codeception/Module/Symfony.php @@ -890,6 +890,29 @@ public function logout() $cookieJar->flushExpiredCookies(); } + /** + * Assert that the session has a given list of values. + * + * ``` php + * seeSessionHasValues(['key1', 'key2']); + * $I->seeSessionHasValues(['key1' => 'value1', 'key2' => 'value2']); + * ``` + * + * @param array $bindings + * @return void + */ + public function seeSessionHasValues(array $bindings) + { + foreach ($bindings as $key => $value) { + if (is_int($key)) { + $this->seeInSession($value); + } else { + $this->seeInSession($key, $value); + } + } + } + /** * Assert that a session attribute exists. *