public function UbercartAttributeTestCase::testAttributeUIClassAttributeAdd in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_attribute/tests/uc_attribute.test \UbercartAttributeTestCase::testAttributeUIClassAttributeAdd()
Tests the "add product class attribute option" user interface.
File
- uc_attribute/
uc_attribute.test, line 660 - Ubercart Attribute Tests
Class
- UbercartAttributeTestCase
- SimpleTests for the Ubercart Attributes API.
Code
public function testAttributeUIClassAttributeAdd() {
$class = $this
->createProductClass();
$attribute = self::createAttribute();
$this
->drupalGet('admin/store/products/classes/' . $class->pcid . '/attributes/add');
$this
->assertRaw(t('@attribute</option>', array(
'@attribute' => $attribute->name,
)), t('Class attribute add form working.'), t('Ubercart'));
$edit["add_attributes[]"] = $attribute->aid;
$this
->drupalPost('admin/store/products/classes/' . $class->pcid . '/attributes/add', $edit, t('Add attributes'));
$this
->assertNoText(t('You must first add attributes to this class.'), t('Class attribute form working.'), t('Ubercart'));
}