find() public method

Class method to find a Subscription
public find ( string $id ) : DataSift_Pylon
$id string
return DataSift_Pylon
Beispiel #1
0
 public function testFind()
 {
     $response = array('response_code' => 200, 'data' => array('volume' => '12300', 'start' => 1436085514, 'end' => 1436089932, 'status' => 'stopped', 'name' => 'birthday sample', 'reached_capacity' => false, 'identity_id' => '58d783dd98dd6b8bc7a39d73928fa7cf', 'hash' => '37fdfa811a6fb20785eecb9de9dd2d3e', 'remaining_index_capacity' => 1000000, 'remaining_account_capacity' => 927200), 'rate_limit' => 200, 'rate_limit_remaining' => 150);
     DataSift_MockApiClient::setResponse($response);
     $pylon = new DataSift_Pylon($this->user);
     $get = $pylon->find($this->user, '37fdfa811a6fb20785eecb9de9dd2d3e');
     $this->assertEquals($get->getHash(), '37fdfa811a6fb20785eecb9de9dd2d3e', 'Hash did not match');
     $this->assertEquals($get->getName(), 'birthday sample', 'Name did not match');
 }