public function KeyValueLongItemTest::testWithDifferentDefaultFormat in Key value field 8
Test storing data to field with different format.
File
- tests/
src/ Kernel/ KeyValueLongItemTest.php, line 75
Class
- KeyValueLongItemTest
- @coversDefaultClass \Drupal\key_value_field\Plugin\Field\FieldType\KeyValueLongItem @group key_value_field
Namespace
Drupal\Tests\key_value_field\KernelCode
public function testWithDifferentDefaultFormat() {
$format = FilterFormat::load('plain_text')
->createDuplicate()
->set('format', 'muh');
$format
->save();
$this
->createTestField('key_value_long', [], [
'default_format' => 'muh',
]);
$entity = EntityTest::create([
'test_key_value_field' => [
'value' => 'orange',
'key' => 'apple',
],
]);
$entity
->save();
$this
->markTestSkipped('You cannot yet configure a different default format???');
$this
->assertEquals('muh', $entity->test_key_value_field->format);
}