Skip to content

Commit

Permalink
Merge pull request #4 from oat-sa/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ekkinox authored Oct 1, 2021
2 parents 6b70f86 + 5e8ca1b commit 2f18cea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ public function buildLtiResourceLinkSubmissionReviewLaunchRequest(

$launchUrl = $ltiResourceLink->getUrl() ?? $submissionReviewUrl;

if (null === $launchUrl) {
throw new LtiException('Neither resource link url nor submission review url were presented');
}

return $this->buildSubmissionReviewLaunchRequest(
$agsClaim,
$forUserClaim,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,37 +193,6 @@ public function testBuildSubmissionReviewLaunchRequestFailureOnMissingLaunchUrl(
);
}

public function testBuildLtiResourceLinkSubmissionReviewLaunchRequestFailureOnMissingLaunchUrl(): void
{
$tool = new Tool(
'toolIdentifier',
'toolName',
'toolAudience',
'http://tool.com/oidc-init'
);

$registration = $this->createTestRegistration(
'registrationIdentifier',
'registrationClientId',
$this->createTestPlatform(),
$tool,
['deploymentIdentifier']
);

$ltiResourceLink = new LtiResourceLink('resourceLinkIdentifier');

$this->expectException(LtiExceptionInterface::class);
$this->expectExceptionMessage('Neither resource link url nor submission review url were presented');

$this->subject->buildLtiResourceLinkSubmissionReviewLaunchRequest(
$ltiResourceLink,
$this->createTestAgsClaim(),
$this->createTestForUserClaim(),
$registration,
'loginHint'
);
}

private function createTestAgsClaim(?string $lineItemUrl = 'http://platform.com/lineitems/1'): AgsClaim
{
return new AgsClaim(
Expand Down

0 comments on commit 2f18cea

Please sign in to comment.