/[drupal]/contributions/modules/ecommerce/ec_product/ec_product.test
ViewVC logotype

Diff of /contributions/modules/ecommerce/ec_product/ec_product.test

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

revision 1.1.2.1 by gordon, Mon Nov 9 11:43:21 2009 UTC revision 1.1.2.2 by gordon, Mon Nov 9 12:31:32 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: ec_product.test,v 1.1.2.1 2009/11/09 11:43:21 gordon Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 33  class ecProductCreate extends DrupalWebT Line 33  class ecProductCreate extends DrupalWebT
33      $this->drupalPost('node/add/product/generic', $edit, t('Save'));      $this->drupalPost('node/add/product/generic', $edit, t('Save'));
34    }    }
35  }  }
36    
37    class ecProductTypeCreate extends DrupalWebTestCase {
38      function getInfo() {
39        return array(
40          'name' => t('Product Type Creation'),
41          'description' => t('Create, Edit and Delete a product type'),
42          'group' => t('e-Commerce'),
43        );
44      }
45    
46      function setUp() {
47        parent::setUp('ec_common', 'ec_product');
48        variable_set('ec_default_currency', 'USD');
49      }
50    
51      function testCreateProductType() {
52        $account = $this->drupalCreateUser(array('create product content', 'administer products'));
53        $this->drupalLogin($account);
54    
55        $edit = array(
56          'name' => $this->randomName(),
57          'ptype' => $this->randomName(),
58          'description' => $this->randomString(255),
59        );
60    
61        $this->drupalPost('admin/ecsettings/products/types/add', $edit, t('Submit product type'));
62    
63        $this->assertText('New product type ', t('New product type created'));
64    
65        $this->clickLink($edit['name']);
66    
67        $edit['description'] = $this->randomName(255);
68        $this->drupalPost(NULL, $edit, t('Submit product type'));
69    
70        $this->assertText('Product type', t('Check for update text'));
71      }
72    }

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

  ViewVC Help
Powered by ViewVC 1.1.3