You are here

private function AddThisFunctionalityTestCase::addThisShouldBeAbleToBeUsedAsField in AddThis 7.4

1 call to AddThisFunctionalityTestCase::addThisShouldBeAbleToBeUsedAsField()
AddThisFunctionalityTestCase::testFunctionality in tests/AddThisFunctionalityTestCase.test

File

tests/AddThisFunctionalityTestCase.test, line 59
Tests for the AddThis-module.

Class

AddThisFunctionalityTestCase
@file Tests for the AddThis-module.

Code

private function addThisShouldBeAbleToBeUsedAsField() {
  $edit = array();
  $label = AddThisTestHelper::generateRandomLowercaseString();
  $edit["fields[_add_new_field][label]"] = $label;
  $edit["fields[_add_new_field][field_name]"] = $label;
  $edit["fields[_add_new_field][type]"] = AddThis::FIELD_TYPE;
  $edit["fields[_add_new_field][widget_type]"] = AddThis::WIDGET_TYPE;
  $this
    ->drupalPost('admin/structure/types/manage/article/fields', $edit, t('Save'));
  $this
    ->assertText($label, 'AddThis-module should be able to be added as a field.');
  $this
    ->addThisShouldNotHaveConfigurableFieldLevelSettings($label);
  $this
    ->drupalGet('admin/structure/types/manage/article/display');
}