You are here

public function LTIToolProviderControllerTest::ltiReturnWithContextDataProvider 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::ltiReturnWithContextDataProvider()

Return value

array

File

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

Class

LTIToolProviderControllerTest
LTIToolProviderController unit tests.

Namespace

Drupal\Tests\lti_tool_provider\Unit

Code

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