public function DsTestTrait::dsCreateTokenField in Display Suite 8.2
Create a token field.
Parameters
array $edit: An optional array of field properties.
string $url: The url to post to.
4 calls to DsTestTrait::dsCreateTokenField()
- CacheTagsTest::testUserCacheTags in src/
Tests/ CacheTagsTest.php - Tests setting the correct cache tags.
- DsTestTrait::entitiesTestSetup in src/
Tests/ DsTestTrait.php - Utility function to setup for all kinds of tests.
- DynamicFieldPluginTest::testDsFields in src/
Tests/ DynamicFieldPluginTest.php - Test Display fields.
- LayoutClassesTest::testDsTestLayouts in src/
Tests/ LayoutClassesTest.php - Test selecting layouts, classes, region to block and fields.
File
- src/
Tests/ DsTestTrait.php, line 111
Class
- DsTestTrait
- Provides common functionality for the Display Suite test classes.
Namespace
Drupal\ds\TestsCode
public function dsCreateTokenField(array $edit = array(), $url = 'admin/structure/ds/fields/manage_token') {
$edit += array(
'name' => 'Test field',
'id' => 'test_field',
'entities[node]' => '1',
'content[value]' => 'Test field',
);
$this
->drupalPostForm($url, $edit, t('Save'));
$this
->assertText(t('The field @name has been saved', array(
'@name' => $edit['name'],
)), t('@name field has been saved', array(
'@name' => $edit['name'],
)));
}