public function UbercartAttributeTestCase::testAttributeUIDeleteAttribute in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_attribute/tests/uc_attribute.test \UbercartAttributeTestCase::testAttributeUIDeleteAttribute()
Tests the "delete attribute" user interface.
File
- uc_attribute/
uc_attribute.test, line 449 - Ubercart Attribute Tests
Class
- UbercartAttributeTestCase
- SimpleTests for the Ubercart Attributes API.
Code
public function testAttributeUIDeleteAttribute() {
$attribute = self::createAttribute();
$this
->drupalGet('admin/store/attributes/' . $attribute->aid . '/delete');
$this
->AssertText(t('Are you sure you want to delete the attribute @name?', array(
'@name' => $attribute->name,
)), t('Attribute delete form working.'), t('Ubercart'));
$edit = (array) self::createAttribute();
unset($edit['aid']);
$this
->drupalPost('admin/store/attributes/' . $attribute->aid . '/delete', array(), t('Delete'));
$this
->AssertText(t('Product attribute deleted.'), t('Attribute deleted properly.'), t('Ubercart'));
}