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 fail whe…
Browse files Browse the repository at this point in the history
…n the session holds invalid data

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

0 comments on commit a3382bf

Please sign in to comment.