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