class PluginSettingsBaseTest

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php \Drupal\Tests\Core\Field\PluginSettingsBaseTest
  2. 10 core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php \Drupal\Tests\Core\Field\PluginSettingsBaseTest
  3. 8.9.x core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php \Drupal\Tests\Core\Field\PluginSettingsBaseTest

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

Hierarchy

Expanded class hierarchy of PluginSettingsBaseTest

File

core/tests/Drupal/Tests/Core/Field/PluginSettingsBaseTest.php, line 17

Namespace

Drupal\Tests\Core\Field
View source
class PluginSettingsBaseTest extends UnitTestCase {
  
  /**
   * @covers ::getThirdPartySettings
   */
  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.