getResponseCode() 공개 메소드

public getResponseCode ( )
 /**
  * @param HttpPingMonitor $httpPingMonitor
  */
 public function httpPingDown(HttpPingMonitor $httpPingMonitor)
 {
     $additionalInfo = '';
     if ($httpPingMonitor->getCheckPhrase() && !$httpPingMonitor->getResponseContainsPhrase()) {
         $additionalInfo = " Response did not contain \"{$httpPingMonitor->getCheckPhrase()}\"";
     }
     $this->sendNotification('whenHttpPingDown', "HTTP Ping Failed: {$httpPingMonitor->getUrl()}!", "HTTP Ping Failed for {$httpPingMonitor->getUrl()}! Response Code {$httpPingMonitor->getResponseCode()}.{$additionalInfo}", BaseSender::TYPE_ERROR);
 }
 /** @test */
 public function it_can_fail_gracefully()
 {
     $httpPingMonitor = new HttpPingMonitor(['url' => 'http://somelongdomainthatdoesntexist12345asdf.com', 'timeout' => 1, 'allowRedirects' => false]);
     $httpPingMonitor->runMonitor();
     $this->assertEmpty($httpPingMonitor->getResponseCode());
 }