You are here

public function PluginSettingsBaseTest::testGetThirdPartySettings in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php \Drupal\Tests\Core\Field\PluginSettingsBaseTest::testGetThirdPartySettings()
  2. 10 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
Contains \Drupal\Tests\Core\Field\PluginSettingsBaseTest.

Class

PluginSettingsBaseTest
@coversDefaultClass \Drupal\Core\Field\PluginSettingsBase @group Field

Namespace

Drupal\Tests\Core\Field

Code

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'));
}