| 8 |
'group' => t('Node Factory Tests'), |
'group' => t('Node Factory Tests'), |
| 9 |
); |
); |
| 10 |
} |
} |
| 11 |
|
|
| 12 |
|
function testTaxonomyFreeTagging() { |
| 13 |
|
$node_type = 'story'; |
| 14 |
|
|
| 15 |
|
if ($this->assertFalse( !module_exists('taxonomy'), 'taxonomy module installed')) { |
| 16 |
|
|
| 17 |
|
$vocs = taxonomy_get_vocabularies( $node_type); |
| 18 |
|
|
| 19 |
|
if ($this->assertFalse( count($vocs) == 0, t('taxonomy attached to !n', array( '!n' => $node_type)))) { |
| 20 |
|
$voc = array_shift( $vocs); |
| 21 |
|
if ($this->assertFalse( !$voc->tags, t('freetagging set'))) { |
| 22 |
|
$edit = $this->prepareNode(); |
| 23 |
|
$edit['title'] = 'testAddTaxonomy '. $edit['title']; |
| 24 |
|
|
| 25 |
|
$edit['taxonomy']['tags'][$voc->vid]= 'a,b,c'; |
| 26 |
|
$edit['taxonomy'][] = 9; |
| 27 |
|
|
| 28 |
|
$nid = node_factory_save_node($edit, FALSE); |
| 29 |
|
} |
| 30 |
|
} |
| 31 |
|
} |
| 32 |
|
} |
| 33 |
|
|
| 34 |
function testCreatePagePrologue() { |
function testCreatePagePrologue() { |
| 35 |
$edit = node_factory_create_node('page'); |
$edit = node_factory_create_node('page'); |
| 36 |
|
|
| 37 |
$this->assertNotNull($edit['uid'], t('Empty uid')); |
$this->assertNotNull($edit['uid'], t('uid set')); |
| 38 |
} |
} |
| 39 |
|
|
| 40 |
function testCreateStory() { |
function testCreateStory() { |