[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/xmlsitemap/xmlsitemap_taxonomy/ -> xmlsitemap_taxonomy.test (source)

   1  <?php
   2  // $Id: xmlsitemap_taxonomy.test,v 1.1.2.2 2010/02/11 02:23:42 davereid Exp $
   3  
   4  /**
   5   * @file
   6   * Unit tests for the xmlsitemap_taxonomy module.
   7   */
   8  
   9  class XMLSitemapTaxonomyFunctionalTest extends XMLSitemapTestHelper {
  10    protected $normal_user;
  11    protected $terms = array();
  12  
  13    public static function getInfo() {
  14      return array(
  15        'name' => 'XML sitemap taxonomy',
  16        'description' => 'Functional tests for the XML sitemap taxonomy module.',
  17        'group' => 'XML sitemap',
  18      );
  19    }
  20  
  21    function setUp() {
  22      parent::setUp('xmlsitemap_taxonomy', 'taxonomy');
  23  
  24      $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'administer xmlsitemap'));
  25      $this->normal_user = $this->drupalCreateUser(array('access content'));
  26    }
  27  
  28    function testTaxonomySettings() {
  29      $this->drupalLogin($this->admin_user);
  30  
  31      $edit = array(
  32        'name' => $this->randomName(),
  33        'xmlsitemap[status]' => '1',
  34        'xmlsitemap[priority]' => '1.0',
  35      );
  36      $this->drupalPost('admin/content/taxonomy/add/vocabulary', $edit, 'Save');
  37      $this->assertText("Created new vocabulary {$edit['name']}.");
  38  
  39      $vid = db_result(db_query("SELECT vid FROM {vocabulary} WHERE name = '%s'", $edit['name']));
  40      $vocabulary = taxonomy_vocabulary_load($vid);
  41  
  42      $edit = array(
  43        'name' => $this->randomName(),
  44        'xmlsitemap[status]' => 'default',
  45        'xmlsitemap[priority]' => 'default',
  46      );
  47      $this->drupalPost("admin/content/taxonomy/$vid/add/term", $edit, 'Save');
  48    }
  49  }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7