public function DateRecurPartGridUnitTest::testSettingsToGridAllowEverything in Recurring Dates Field 3.x
Same name and namespace in other branches
- 8.2 tests/src/Unit/DateRecurPartGridUnitTest.php \Drupal\Tests\date_recur\Unit\DateRecurPartGridUnitTest::testSettingsToGridAllowEverything()
- 3.0.x tests/src/Unit/DateRecurPartGridUnitTest.php \Drupal\Tests\date_recur\Unit\DateRecurPartGridUnitTest::testSettingsToGridAllowEverything()
- 3.1.x tests/src/Unit/DateRecurPartGridUnitTest.php \Drupal\Tests\date_recur\Unit\DateRecurPartGridUnitTest::testSettingsToGridAllowEverything()
Tests config settings to grid helper.
@covers ::configSettingsToGrid
File
- tests/src/ Unit/ DateRecurPartGridUnitTest.php, line 68 
Class
- DateRecurPartGridUnitTest
- Tests part grid class.
Namespace
Drupal\Tests\date_recur\UnitCode
public function testSettingsToGridAllowEverything() {
  $parts = [
    'all' => TRUE,
  ];
  $partGrid = DateRecurPartGrid::configSettingsToGrid($parts);
  $this
    ->assertTrue($partGrid
    ->isAllowEverything());
  // A false 'all' config doesn't disallow everything, it defers part
  // allowance to 'frequency' config.
  $parts = [
    'all' => FALSE,
  ];
  $partGrid = DateRecurPartGrid::configSettingsToGrid($parts);
  $this
    ->assertTrue($partGrid
    ->isAllowEverything());
}