public function SmsTestEventSubscriber::testAddGateway200 in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/modules/sms_test/src/EventSubscriber/SmsTestEventSubscriber.php \Drupal\sms_test\EventSubscriber\SmsTestEventSubscriber::testAddGateway200()
- 2.1.x tests/modules/sms_test/src/EventSubscriber/SmsTestEventSubscriber.php \Drupal\sms_test\EventSubscriber\SmsTestEventSubscriber::testAddGateway200()
Adds a gateway with ID 'test_gateway_200', with weight '200'.
Parameters
\Drupal\sms\Event\RecipientGatewayEvent $event: The RecipientGatewayEvent event.
File
- tests/
modules/ sms_test/ src/ EventSubscriber/ SmsTestEventSubscriber.php, line 22
Class
- SmsTestEventSubscriber
- Test event subscriber.
Namespace
Drupal\sms_test\EventSubscriberCode
public function testAddGateway200(RecipientGatewayEvent $event) {
if (\Drupal::state()
->get('sms_test_event_subscriber__test_gateway_200', FALSE)) {
$gateway = SmsGateway::load('test_gateway_200');
$event
->addGateway($gateway, 200);
}
}