You are here

protected function SmsFrameworkUserActiveHoursServiceTest::setActiveHours in SMS Framework 8

Same name and namespace in other branches
  1. 2.x modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserActiveHoursServiceTest::setActiveHours()
  2. 2.1.x modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserActiveHoursServiceTest::setActiveHours()

Helper to set and replace existing active hours ranges.

11 calls to SmsFrameworkUserActiveHoursServiceTest::setActiveHours()
SmsFrameworkUserActiveHoursServiceTest::testDelaySmsMessage in modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
Tests delay was applied to a SMS message.
SmsFrameworkUserActiveHoursServiceTest::testDelaySmsMessageNotAutomated in modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
Tests delay was not applied to a SMS message if it is tagged as automated.
SmsFrameworkUserActiveHoursServiceTest::testFindNextTimeSameDay in modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
Test getting the range for today when within todays range.
SmsFrameworkUserActiveHoursServiceTest::testFindNextTimeSameDayOutOfHours in modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
Test getting a range for next day when out of hours when a range was today.
SmsFrameworkUserActiveHoursServiceTest::testGetRanges in modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
Tests getting date ranges.

... See full list

File

modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php, line 275

Class

SmsFrameworkUserActiveHoursServiceTest
Tests active hours service.

Namespace

Drupal\Tests\sms_user\Kernel

Code

protected function setActiveHours($ranges) {
  \Drupal::configFactory()
    ->getEditable('sms_user.settings')
    ->set('active_hours.ranges', $ranges)
    ->save();
}