diff --git a/src/Message/Launch/Builder/SubmissionReviewLaunchRequestBuilder.php b/src/Message/Launch/Builder/SubmissionReviewLaunchRequestBuilder.php index a47117e..2d5a9cb 100644 --- a/src/Message/Launch/Builder/SubmissionReviewLaunchRequestBuilder.php +++ b/src/Message/Launch/Builder/SubmissionReviewLaunchRequestBuilder.php @@ -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, diff --git a/tests/Unit/Message/Launch/Builder/SubmissionReviewLaunchRequestBuilderTest.php b/tests/Unit/Message/Launch/Builder/SubmissionReviewLaunchRequestBuilderTest.php index 129d4f6..23236cd 100644 --- a/tests/Unit/Message/Launch/Builder/SubmissionReviewLaunchRequestBuilderTest.php +++ b/tests/Unit/Message/Launch/Builder/SubmissionReviewLaunchRequestBuilderTest.php @@ -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(