StringTest.php in Field Defaults 8
File
src/Tests/StringTest.php
View source
<?php
namespace Drupal\field_defaults\Tests;
class StringTest extends FieldDefaultsTestBase {
public function testFieldString() {
$fieldName = $this
->createField('string');
$this
->setDefaultValues($fieldName, 'string');
$this
->drupalGet('node/' . rand(1, 20) . '/edit');
$field_setup = $this
->setupFieldByType('string');
$this
->assertFieldByName('field_' . $fieldName . $field_setup['structure'], $field_setup['value']);
}
}
Classes
Name |
Description |
StringTest |
Tests that defaults are set on string fields. |