Esempio n. 1
0
 /**
  *  Test select_expiration_date() method
  *
  *  Test the {@link DateHelper::select_expiration_date()} method
  */
 public function testSelect_expiration_date_method()
 {
     $dh = new DateHelper();
     //  Test expiration date of August this year
     $_REQUEST['expiration_year'] = date('Y');
     $_REQUEST['expiration_month'] = '08';
     $this->assertContains('<option value="' . date('Y') . '"  selected="selected"', $dh->select_expiration_date());
     $this->assertContains('<option value="' . (date('Y') + 7) . '"', $dh->select_expiration_date());
     $this->assertContains('<option value="08" selected="selected">' . '8</option>', $dh->select_expiration_date());
 }