/** * Test to_expiration_date_select_tag() method * * Test the {@link DateHelper::to_expiration_date_select_tag()} method */ public function testTo_expiration_date_select_tag_method() { $dh = new DateHelper('License', 'expiration_date'); $_REQUEST['License']['expiration_date(1i)'] = date('Y'); $_REQUEST['License']['expiration_date(2i)'] = '08'; // Test expiration date of August this year $this->assertContains('<option value="' . date('Y') . '" selected="selected"', $dh->to_expiration_date_select_tag()); $this->assertContains('<option value="' . (date('Y') + 7) . '"', $dh->to_expiration_date_select_tag()); $this->assertContains('<option value="08" selected="selected">' . '8</option>', $dh->to_expiration_date_select_tag()); }