From 7c4b73dd64e01001946aac76c6deddfe1c6ef0be Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sun, 28 Dec 2014 20:42:39 +0100 Subject: [PATCH] zendframework/zf2#6366 - explicitly defined session validator data should be honored during validation Signed-off-by: Marco Pivetta --- test/SessionManagerTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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(); + } }