Пример #1
0
 /**
  * @covers Component\Remote\BurzeDzisNet\Alert::__construct
  */
 public function test__construct()
 {
     $alert = new Alert(1, '2015-02-12', '2015-02-18');
     $this->assertSame(1, $alert->level());
     $this->assertSame('2015-02-12', $alert->startDate());
     $this->assertSame('2015-02-18', $alert->endDate());
 }
 /**
  * Assert precipitation alert
  *
  * @param stdClass $alertTO       alert transfer object
  * @param Alert    $precipitation precipitation alert
  */
 protected function assertPrecipitation(stdClass $alertTO, Alert $precipitation)
 {
     $this->assertSame($alertTO->opad, $precipitation->level());
     $this->assertSame($alertTO->opad_od_dnia, $precipitation->startDate());
     $this->assertSame($alertTO->opad_do_dnia, $precipitation->endDate());
 }