Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
zendframework/zendframework#6366 - explicitly defined session validat…
Browse files Browse the repository at this point in the history
…or data should be honored during validation

Signed-off-by: Marco Pivetta <ocramius@gmail.com>
  • Loading branch information
Ocramius authored and weierophinney committed Jan 14, 2015
1 parent b190394 commit 7c4b73d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/SessionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit 7c4b73d

Please sign in to comment.