Skip to content

Commit

Permalink
add test that simulate new validator construction
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Torresi committed Mar 5, 2014
1 parent 8a9f4bc commit 3afc417
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ZendTest/Validator/CsrfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,13 @@ public function testSettingNewSessionContainerSetsHashInNewContainer()
$test = $container->hash; // Doing this, as expiration hops are 1; have to grab on first access
$this->assertEquals($hash, $test);
}

public function testCanValidateWithOldBehaviour()
{
$hash = $this->validator->getHash();

$validator = new Csrf();

$this->assertTrue($validator->isValid($hash));
}
}

0 comments on commit 3afc417

Please sign in to comment.