示例#1
0
 /**
  * Test if the `append` method appends a value to a previous set value.
  */
 public function testAppendAppendsToPreviousSetValue()
 {
     $key = new Hash(Hash::ALGO_SHA1);
     $key->append('first value, ');
     $key->append('second value');
     $this->assertSame(hash('sha1', 'first value, second value'), $key->create());
 }
示例#2
0
文件: HashKey.php 项目: mohiva/common
 /**
  * Append a string to the source.
  *
  * @param string $string The string to append.
  */
 public function append($string)
 {
     $this->hash->append($string);
 }