You are here

public function AgreementTest::settingsProvider 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::settingsProvider()

Provides various settings arrays for tests.

Return value

array An array of test arguments.

File

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

Class

AgreementTest
Tests methods on the agreement entity.

Namespace

Drupal\Tests\agreement\Unit\Entity

Code

public function settingsProvider() {
  $defaults = Agreement::getDefaultSettings();
  $no_reset_date = self::DEFAULT_AGREEMENT_SETTINGS;
  unset($no_reset_date['reset_date']);
  return [
    'no settings provided' => [
      $defaults,
      NULL,
    ],
    'empty settings provided' => [
      $defaults,
      [],
    ],
    'default agreement' => [
      self::DEFAULT_AGREEMENT_SETTINGS,
      self::DEFAULT_AGREEMENT_SETTINGS,
    ],
    'no reset date' => [
      self::DEFAULT_AGREEMENT_SETTINGS,
      $no_reset_date,
    ],
  ];
}