Exemplo n.º 1
0
 public function testGetHash()
 {
     $rule = new Rule($this->pool, array(123), 'job1', null);
     $this->assertEquals(substr(md5('123'), 0, 5), $rule->getHash());
 }
Exemplo n.º 2
0
 public function testGetHash()
 {
     $rule = new Rule(array(123), 'job1', null);
     $hash = unpack('ihash', md5('123', true));
     $this->assertEquals($hash['hash'], $rule->getHash());
 }
Exemplo n.º 3
0
 public function testGetHash()
 {
     $rule = new Rule(array(), 'job1', null);
     $rule->ruleHash = '123';
     $this->assertEquals('123', $rule->getHash());
 }