function PluginSettingsBaseTest::testGetThirdPartySettings
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php \Drupal\Tests\Core\Field\PluginSettingsBaseTest::testGetThirdPartySettings()
- 10 core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php \Drupal\Tests\Core\Field\PluginSettingsBaseTest::testGetThirdPartySettings()
- 11.x core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php \Drupal\Tests\Core\Field\PluginSettingsBaseTest::testGetThirdPartySettings()
@covers ::getThirdPartySettings
File
-
core/
tests/ Drupal/ Tests/ Core/ Field/ PluginSettingsBaseTest.php, line 22
Class
- PluginSettingsBaseTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Field%21PluginSettingsBase.php/class/PluginSettingsBase/8.9.x" title="Base class for the Field API plugins." class="local">\Drupal\Core\Field\PluginSettingsBase</a> @group Field
Namespace
Drupal\Tests\Core\FieldCode
public function testGetThirdPartySettings() {
$plugin_settings = new TestPluginSettingsBase();
$this->assertSame([], $plugin_settings->getThirdPartySettings());
$this->assertSame([], $plugin_settings->getThirdPartySettings('test'));
$plugin_settings->setThirdPartySetting('test', 'foo', 'bar');
$this->assertSame([
'foo' => 'bar',
], $plugin_settings->getThirdPartySettings('test'));
$this->assertSame([], $plugin_settings->getThirdPartySettings('test2'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.