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 - session validation should succeed …
Browse files Browse the repository at this point in the history
…when the session holds valid data

Signed-off-by: Marco Pivetta <ocramius@gmail.com>
  • Loading branch information
Ocramius authored and weierophinney committed Jan 14, 2015
1 parent 7c4b73d commit 3b1a65b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/SessionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,4 +571,20 @@ public function testRemoteAddressValidationWillFailOnInvalidAddress()
$this->setExpectedException('Zend\Session\Exception\RuntimeException', 'Session validation failed');
$this->manager->start();
}

/**
* @runInSeparateProcess
*/
public function testRemoteAddressValidationWillSucceedWithValidPreSetData()
{
$_SESSION = array(
'__ZF' => array(
'_VALID' => array('Zend\Session\Validator\RemoteAddr' => ''),
),
);

$this->manager->start();

$this->assertTrue($this->manager->isValid());
}
}

0 comments on commit 3b1a65b

Please sign in to comment.