You are here

public function LTIToolProviderControllerTest::ltiLaunchWithContextDataProvider in LTI Tool Provider 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/LTIToolProviderControllerTest.php \Drupal\Tests\lti_tool_provider\Unit\LTIToolProviderControllerTest::ltiLaunchWithContextDataProvider()

Return value

array

File

tests/src/Unit/LTIToolProviderControllerTest.php, line 167

Class

LTIToolProviderControllerTest
LTIToolProviderController unit tests.

Namespace

Drupal\Tests\lti_tool_provider\Unit

Code

public function ltiLaunchWithContextDataProvider() : array {
  return [
    'destination from settings' => [
      new RedirectResponse('/'),
      Request::create('/lti'),
      new Session(),
      [
        'no destination url',
      ],
      '/',
    ],
    'destination from context' => [
      new RedirectResponse('/'),
      Request::create('/lti'),
      new Session(),
      [
        'custom_destination' => '/',
      ],
      null,
    ],
  ];
}