You are here

protected function SmsFrameworkUserActiveHoursServiceTest::activeHoursStatus 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::activeHoursStatus()
  2. 2.1.x modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php \Drupal\Tests\sms_user\Kernel\SmsFrameworkUserActiveHoursServiceTest::activeHoursStatus()

Helper to set status of active hours.

8 calls to SmsFrameworkUserActiveHoursServiceTest::activeHoursStatus()
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::testInHoursActiveHoursOff in modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
Test if in hours if active hours is disabled and out of active hours.
SmsFrameworkUserActiveHoursServiceTest::testInHoursAllDay in modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
Test if in hours for 24 hours with same timezone.
SmsFrameworkUserActiveHoursServiceTest::testInHoursAllDayDifferentTimezone in modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
Test if in hours for 24 hours with different timezone.

... See full list

File

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

Class

SmsFrameworkUserActiveHoursServiceTest
Tests active hours service.

Namespace

Drupal\Tests\sms_user\Kernel

Code

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