| 7 taxonomy.test | TaxonomyLegacyTestCase::testTaxonomyLegacyNode() |
| 8 taxonomy.test | TaxonomyLegacyTestCase::testTaxonomyLegacyNode() |
Test taxonomy functionality with nodes prior to 1970.
File
- modules/
taxonomy/ taxonomy.test, line 490 - Tests for taxonomy.module.
Code
function testTaxonomyLegacyNode() {
// Posts an article with a taxonomy term and a date prior to 1970.
$langcode = LANGUAGE_NONE;
$edit = array();
$edit['title'] = $this->randomName();
$edit['date'] = '1969-01-01 00:00:00 -0500';
$edit["body[$langcode][0][value]"] = $this->randomName();
$edit["field_tags[$langcode]"] = $this->randomName();
$this->drupalPost('node/add/article', $edit, t('Save'));
// Checks that the node has been saved.
$node = $this->drupalGetNodeByTitle($edit['title']);
$this->assertEqual($node->created, strtotime($edit['date']), t('Legacy node was saved with the right date.'));
}
Login or register to post comments