Ejemplo n.º 1
0
 /**
  * Test for createHash()
  *
  * @return void
  * @test
  */
 public function createHashReturnsString()
 {
     $form = new Form();
     $form->_setProperty('uid', 123);
     $mail = new Mail();
     $mail->_setProperty('uid', 123);
     $mail->_setProperty('pid', 124);
     $mail->setForm($form);
     $result = OptinUtility::createOptinHash($mail);
     $this->assertEquals('abf068777a', $result);
     $this->assertTrue(strlen($result) === 10);
 }
 /**
  * Test for createHash()
  *
  * @return void
  * @test
  */
 public function createHashReturnsString()
 {
     $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = 'abcdef';
     $form = new Form();
     $form->_setProperty('uid', 123);
     $mail = new Mail();
     $mail->_setProperty('uid', 123);
     $mail->_setProperty('pid', 124);
     $mail->setForm($form);
     $result = OptinUtility::createOptinHash($mail);
     $this->assertEquals('cf06c6db71', $result);
     $this->assertTrue(strlen($result) === 10);
 }