Example #1
0
 /**
  * Run tests to ensure the output is correct for set/getDay, set/getMon, etc.
  *
  * @return void
  */
 public function testDay()
 {
     $clock = new Clock();
     $clock->setDay(0, "100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
     $this->assertEquals("100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getSun());
     $clock->setDay(1, "110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
     $this->assertEquals("110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getMon());
     $clock->setDay(2, "111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
     $this->assertEquals("111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getTue());
     $clock->setDay(3, "111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
     $this->assertEquals("111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getWed());
     $clock->setDay(4, "111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
     $this->assertEquals("111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getThu());
     $clock->setDay(5, "111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
     $this->assertEquals("111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getFri());
     $clock->setDay(6, "111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
     $this->assertEquals("111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getSat());
     $this->assertEquals("100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getDay(0));
     $this->assertEquals("110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getDay(1));
     $this->assertEquals("111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getDay(2));
     $this->assertEquals("111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getDay(3));
     $this->assertEquals("111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getDay(4));
     $this->assertEquals("111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getDay(5));
     $this->assertEquals("111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", $clock->getDay(6));
     $clock->resetClock();
     $this->assertEquals($this->_emptyRec, $clock->getSun());
     $this->assertEquals($this->_emptyRec, $clock->getMon());
     $this->assertEquals($this->_emptyRec, $clock->getTue());
     $this->assertEquals($this->_emptyRec, $clock->getWed());
     $this->assertEquals($this->_emptyRec, $clock->getThu());
     $this->assertEquals($this->_emptyRec, $clock->getFri());
     $this->assertEquals($this->_emptyRec, $clock->getSat());
 }