public function NodeRecurDateTestCase::testNodeRecurContentCreateDateRepeat in Node recur 7.2
File
- tests/
node_recur.test, line 393
Class
- NodeRecurDateTestCase
- Date field tests for node recur
Code
public function testNodeRecurContentCreateDateRepeat() {
$edit = array();
$edit["title"] = 'Node Recur Node';
$edit["field_date_simple[und][0][value][date]"] = '08/22/2025 - 15:45';
$edit["field_date_iso[und][0][value][date]"] = '06/01/2025 - 15:45';
$edit["field_date_unix[und][0][value][date]"] = '07/01/2025 - 15:45';
$this
->drupalPost('node/add/repeating-node', $edit, t('Save'));
$this
->assertText("has been created", 'Node has been created');
$this
->clickLink(t('Repeat this repeating node'));
$edit = array();
$edit['field_date_simple[und][0][rrule][FREQ]'] = 'WEEKLY';
$edit['field_date_simple[und][0][rrule][count_child]'] = 5;
$this
->drupalPost(NULL, $edit, t('Generate'));
$this
->assertText("This action cannot be undone. Please confirm that the dates above are accurate and that the repeating node information is correct. Editing this repeating node afterwards will not edit every repeating node generated here.", 'Warning message');
$this
->assertText("August 29, 2025", 'August 29 2025 found');
$this
->assertText("September 5, 2025", 'September 5 2025 found');
$this
->assertText("September 12, 2025", 'September 12 2025 found');
$this
->assertText("September 19, 2025", 'September 19 2025 found');
$this
->assertText("September 26, 2025", 'September 26 2025 found');
$this
->drupalPost(NULL, array(), t('Submit'));
$this
->assertText('5 items have been generated.');
$this
->drupalGet('node/1');
$this
->assertText("August 22, 2025", 'August 22 2025 found');
$this
->assertText('June 1, 2025 - 15:45', 'June 01 2025 found');
$this
->assertText('July 1, 2025 - 15:45', 'July 01 2025 found');
$this
->drupalGet('node/2');
$this
->assertText("August 29, 2025", 'August 29 2025 found');
$this
->assertText('June 1, 2025 - 15:45', 'June 01 2025 found');
$this
->assertText('July 1, 2025 - 15:45', 'July 01 2025 found');
$this
->drupalGet('node/3');
$this
->assertText("September 5, 2025", 'September 5 2025 found');
$this
->assertText('June 1, 2025 - 15:45', 'June 01 2025 found');
$this
->assertText('July 1, 2025 - 15:45', 'July 01 2025 found');
$this
->drupalGet('node/4');
$this
->assertText("September 12, 2025", 'September 12 2025 found');
$this
->assertText('June 1, 2025 - 15:45', 'June 01 2025 found');
$this
->assertText('July 1, 2025 - 15:45', 'July 01 2025 found');
$this
->drupalGet('node/5');
$this
->assertText("September 19, 2025", 'September 19 2025 found');
$this
->assertText('June 1, 2025 - 15:45', 'June 01 2025 found');
$this
->assertText('July 1, 2025 - 15:45', 'July 01 2025 found');
$this
->drupalGet('node/6');
$this
->assertText("September 26, 2025", 'September 26 2025 found');
$this
->assertText('June 1, 2025 - 15:45', 'June 01 2025 found');
$this
->assertText('July 1, 2025 - 15:45', 'July 01 2025 found');
}