public function DateRecurPartGridUnitTest::testSettingsToGridAllFrequenciesDisabled in Recurring Dates Field 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/Unit/DateRecurPartGridUnitTest.php \Drupal\Tests\date_recur\Unit\DateRecurPartGridUnitTest::testSettingsToGridAllFrequenciesDisabled()
- 3.x tests/src/Unit/DateRecurPartGridUnitTest.php \Drupal\Tests\date_recur\Unit\DateRecurPartGridUnitTest::testSettingsToGridAllFrequenciesDisabled()
- 3.1.x tests/src/Unit/DateRecurPartGridUnitTest.php \Drupal\Tests\date_recur\Unit\DateRecurPartGridUnitTest::testSettingsToGridAllFrequenciesDisabled()
Tests config settings to grid helper.
@covers ::configSettingsToGrid
File
- tests/
src/ Unit/ DateRecurPartGridUnitTest.php, line 85
Class
- DateRecurPartGridUnitTest
- Tests part grid class.
Namespace
Drupal\Tests\date_recur\UnitCode
public function testSettingsToGridAllFrequenciesDisabled() {
$parts = [
'all' => FALSE,
'frequencies' => [
'WEEKLY' => [],
],
];
$partGrid = DateRecurPartGrid::configSettingsToGrid($parts);
// Test defined frequency.
$this
->assertFalse($partGrid
->isFrequencyAllowed('WEEKLY'));
// Test undefined frequency.
$this
->assertFalse($partGrid
->isFrequencyAllowed('DAILY'));
}