Example #1
0
 public function testMatchRegEx()
 {
     $pinger = new Pinger([], '');
     $regEx = '(response ok)';
     $this->assertSame(PingResult::STATUS_OK, $pinger->matchRegEx('<p>response ok</p>', $regEx));
     $this->assertSame(PingResult::STATUS_PROBLEM, $pinger->matchRegEx('<p>response not ok</p>', $regEx));
 }