You are here

public function AgreementTest::testGetSettings in Agreement 8.2

Same name and namespace in other branches
  1. 3.0.x tests/src/Unit/Entity/AgreementTest.php \Drupal\Tests\agreement\Unit\Entity\AgreementTest::testGetSettings()

Asserts that settings are populated.

@dataProvider settingsProvider

Parameters

array $expected: The expected output.

array|null $settings: The configuration settings.

File

tests/src/Unit/Entity/AgreementTest.php, line 48

Class

AgreementTest
Tests methods on the agreement entity.

Namespace

Drupal\Tests\agreement\Unit\Entity

Code

public function testGetSettings(array $expected, $settings) {
  $agreement = new Agreement([
    'id' => 'test',
    'label' => 'Test',
    'path' => '/agreement',
    'agreement' => 'Agree',
    'settings' => $settings,
  ], 'agreement');
  $this
    ->assertArrayEquals($expected, $agreement
    ->getSettings());
}