diff --git a/test/SessionManagerTest.php b/test/SessionManagerTest.php index b6769ae3..fed7af63 100644 --- a/test/SessionManagerTest.php +++ b/test/SessionManagerTest.php @@ -587,4 +587,19 @@ public function testRemoteAddressValidationWillSucceedWithValidPreSetData() $this->assertTrue($this->manager->isValid()); } + + /** + * @runInSeparateProcess + */ + public function testRemoteAddressValidationWillFailWithInvalidPreSetData() + { + $_SESSION = array( + '__ZF' => array( + '_VALID' => array('Zend\Session\Validator\RemoteAddr' => '123.123.123.123'), + ), + ); + + $this->setExpectedException('Zend\Session\Exception\RuntimeException', 'Session validation failed'); + $this->manager->start(); + } }