public function testGmapTaxonomyFormsTestCase::testMacroMenuExampleCreate in GMap Module 7.2
Same name and namespace in other branches
- 7 tests/gmap.test \testGmapTaxonomyFormsTestCase::testMacroMenuExampleCreate()
File
- tests/
gmap.test, line 220 - Unit tests for gmap.module.
Class
Code
public function testMacroMenuExampleCreate() {
// Create node to edit.
$rname = $this
->randomName();
$edit = array(
'name' => $rname,
'machine_name' => 'gmap_taxonomy_test_voc',
'gmap_taxonomy_enable' => 1,
);
// create taxonomy vocabulary with gmap markers
$this
->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
$this
->assertText(t('Created new vocabulary'));
// add taxonomy term with "small red" marker
$edit2 = array(
'name' => $this
->randomName(),
'gmap_taxonomy_marker' => 'small red',
);
$this
->drupalGet('admin/structure/taxonomy/gmap_taxonomy_test_voc/add', $edit);
$this
->assertText(t('GMap Marker'));
$this
->drupalPost('admin/structure/taxonomy/gmap_taxonomy_test_voc/add', $edit2, t('Save'));
$this
->assertText(t('Created new term'));
}