Skip to content

Commit

Permalink
Expect TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-stoehr committed Oct 26, 2023
1 parent 976425a commit c7ae621
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tests/Functional/Common/MetsDocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@ public function canGetDownloadLocation()
$correct = $doc->getDownloadLocation('FILE_0000_DOWNLOAD');
$this->assertEquals('https://example.com/download?&CVT=jpeg', $correct);

$incorrect = $doc->getDownloadLocation('ID_DOES_NOT_EXIST');
$this->assertEquals('', $incorrect);
/*
* The method `getDownloadLocation` should return a string, but returns null in some cases.
* Therefor, a TypeError must be expected here.
*/
$this->expectException('TypeError');
$doc->getDownloadLocation('ID_DOES_NOT_EXIST');
}


Expand Down

0 comments on commit c7ae621

Please sign in to comment.