diff --git a/test/SessionManagerTest.php b/test/SessionManagerTest.php index 7df9223a..47f03872 100644 --- a/test/SessionManagerTest.php +++ b/test/SessionManagerTest.php @@ -557,4 +557,18 @@ public function testValidatorChainSessionMetadataIsPreserved() $_SESSION['__ZF']['_VALID'] ); } + + /** + * @runInSeparateProcess + */ + public function testRemoteAddressValidationWillFailOnInvalidAddress() + { + $this + ->manager + ->getValidatorChain() + ->attach('session.validate', array(new RemoteAddr('123.123.123.123'), 'isValid')); + + $this->setExpectedException('Zend\Session\Exception\RuntimeException', 'Session validation failed'); + $this->manager->start(); + } }