public function testValidatorTokenReceivesSessionHashWhenPresent() { $session = $this->element->getSession(); $session->hash = $this->element->getHash(); $element = new HashElement('foo', array('session' => $session)); $validator = $element->getValidator('Identical'); $this->assertEquals($session->hash, $validator->getToken()); }
public function testMutlipleHashElementsWithSameNameShareSingleHash() { $element = new HashElement('foo'); $this->assertSame($this->element->getHash(), $element->getHash()); }