You are here

public function SmsFrameworkIncomingRouteTest::testIncomingRouteUnsupported in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/SmsFrameworkIncomingRouteTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkIncomingRouteTest::testIncomingRouteUnsupported()
  2. 2.1.x tests/src/Kernel/SmsFrameworkIncomingRouteTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkIncomingRouteTest::testIncomingRouteUnsupported()

Tests route does not exist for gateway without incoming route.

File

tests/src/Kernel/SmsFrameworkIncomingRouteTest.php, line 47

Class

SmsFrameworkIncomingRouteTest
Tests incoming routes for gateway plugins.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testIncomingRouteUnsupported() {
  $gateway = $this
    ->createMemoryGateway([
    'plugin' => 'capabilities_default',
  ]);
  $this
    ->setExpectedException(RouteNotFoundException::class);
  $route = 'sms.incoming.receive.' . $gateway
    ->id();
  $this->routeProvider
    ->getRouteByName($route);
}