Example #1
0
 public function testResponseCodeOverridesRegEx()
 {
     $urls = ['/url/ok' => '(good)'];
     $request = static::mockRequest(501, 'good');
     $guzzle = m::mock('Guzzle\\Http\\ClientInterface');
     $guzzle->shouldReceive('get')->with('/url/ok')->andReturn($request);
     $pinger = new Pinger($urls, '', $guzzle);
     $res = $pinger->interrogateUrls();
     $this->assertSame(['/url/ok' => ['status' => 501, 'result' => PingResult::STATUS_PROBLEM]], $res);
 }