/**
  * Initalize test wide variable, it is called in start of the testcase
  */
 protected function setUp()
 {
     parent::setUp();
     // Get form data.
     $form = new temp_form_date();
     $this->mform = $form->getform();
     // Set test values.
     $this->testvals = array(array('day' => 1, 'month' => 7, 'year' => 2011, 'usertimezone' => 'America/Moncton', 'timezone' => 'America/Moncton', 'timestamp' => 1309489200), array('day' => 1, 'month' => 7, 'year' => 2011, 'usertimezone' => 'America/Moncton', 'timezone' => 99, 'timestamp' => 1309489200), array('day' => 30, 'month' => 6, 'year' => 2011, 'usertimezone' => 'America/Moncton', 'timezone' => -4, 'timestamp' => 1309406400), array('day' => 30, 'month' => 6, 'year' => 2011, 'usertimezone' => -4, 'timezone' => 99, 'timestamp' => 1309406400), array('day' => 1, 'month' => 7, 'year' => 2011, 'usertimezone' => 0.0, 'timezone' => 0.0, 'timestamp' => 1309478400), array('day' => 1, 'month' => 7, 'year' => 2011, 'usertimezone' => 0.0, 'timezone' => 99, 'timestamp' => 1309478400));
 }
示例#2
0
 /**
  * Initalize test wide variable, it is called in start of the testcase
  */
 protected function setUp()
 {
     global $CFG;
     parent::setUp();
     $this->resetAfterTest();
     $this->setAdminUser();
     $this->setTimezone('Australia/Perth');
     // Get form data.
     $form = new temp_form_date();
     $this->mform = $form->getform();
     // Set test values.
     $this->testvals = array(array('day' => 1, 'month' => 7, 'year' => 2011, 'usertimezone' => 'America/Moncton', 'timezone' => 'America/Moncton', 'timestamp' => 1309489200), array('day' => 1, 'month' => 7, 'year' => 2011, 'usertimezone' => 'America/Moncton', 'timezone' => 99, 'timestamp' => 1309489200), array('day' => 30, 'month' => 6, 'year' => 2011, 'usertimezone' => 'America/Moncton', 'timezone' => -4, 'timestamp' => 1309406400), array('day' => 30, 'month' => 6, 'year' => 2011, 'usertimezone' => -4, 'timezone' => 99, 'timestamp' => 1309406400), array('day' => 1, 'month' => 7, 'year' => 2011, 'usertimezone' => 0.0, 'timezone' => 0.0, 'timestamp' => 1309478400), array('day' => 1, 'month' => 7, 'year' => 2011, 'usertimezone' => 0.0, 'timezone' => 99, 'timestamp' => 1309478400));
 }