/[drupal]/contributions/modules/node_factory/tests/node_factory.test
ViewVC logotype

Diff of /contributions/modules/node_factory/tests/node_factory.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.1, Thu Aug 14 18:06:49 2008 UTC revision 1.1.2.2, Fri Aug 15 12:50:44 2008 UTC
# Line 8  class NodeFactoryTest extends DrupalTest Line 8  class NodeFactoryTest extends DrupalTest
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() {

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2