From bafbc76cfae4a56a6ca4cf92751f323cf4d35ece Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 22 Sep 2020 11:16:59 +0200 Subject: [PATCH] Add missing test case --- tests/Unit/Verification/LinkTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Unit/Verification/LinkTest.php b/tests/Unit/Verification/LinkTest.php index e5c0714..780b246 100644 --- a/tests/Unit/Verification/LinkTest.php +++ b/tests/Unit/Verification/LinkTest.php @@ -198,4 +198,19 @@ class LinkTest extends TestCase $subject->getVerificationButton('self') ); } + + /** + * @test + */ + public function throwsExceptionIfNoSkillIdIsProvided() + { + $settings = $this->prophesize(Settings::class); + $settings->getMySkillDisplayUrl()->willReturn('https://my.example.com/verify'); + + $subject = new Link($settings->reveal()); + + $this->expectExceptionMessage('No skill ID provided.'); + $this->expectExceptionCode(1599723825); + $subject->getVerificationLink('education'); + } }