/** * @depends testChecks */ public function testPerformanceSummary(array $checks) { $pingdom = new \Pingdom\Client($this->username, $this->password, $this->token); $keys = array('unmonitored', 'uptime', 'avgresponse', 'starttime', 'downtime'); foreach ($checks as $check) { foreach (array('hour', 'day', 'week') as $resolution) { foreach ($pingdom->getPerformanceSummary($check['id'], $resolution) as $summary) { foreach ($keys as $key) { $this->assertArrayHasKey($key, $summary); } } } } }
/** * @param \ArrayObject $project * * @return mixed */ public function postRemove(\ArrayObject $project) { $username = $this->app["config"]["pingdom"]["username"]; $password = $this->app["config"]["pingdom"]["password"]; $token = $this->app["config"]["pingdom"]["token"]; if (!(empty($contactIds) && empty($username) && empty($password) && empty($token))) { $pingdom = new \Pingdom\Client($username, $password, $token); foreach ($pingdom->getAllChecks() as $key => $value) { if ($value['name'] == $project['name']) { $pingdom->removeCheck($value['id']); } } } }