示例#1
0
 /**
  * Process the result by execution all actions.
  *
  * @param String $url
  * @param String $data
  */
 public function processActions($url, $data)
 {
     $hash = $this->client->createHashFromUrl($url);
     $result = new Result($hash, $url, $data);
     foreach ($this->actions as $action) {
         $result = $action->execute($result);
     }
     unset($result);
 }
示例#2
0
 public function testHashesAUrl()
 {
     $client = new HttpClient('http://google.com/');
     $this->assertEquals('4539330648b80f94ef3bf911f6d77ac9', $client->createHashFromUrl('http://google.com/test'));
     $this->assertEquals($client->createHashFromUrl('http://google.com/test'), $client->createHashFromUrl('/test'));
 }