8 namespace Fossology\Lib\View;
15 return "http://localhost/repo";
23 protected function setUp() :
void
28 public function testGetLicenseTextLink()
31 $shortName =
"<shortName>";
32 $fullName =
"<fullName>";
34 $licenseRef = M::mock(LicenseRef::class);
35 $licenseRef->shouldReceive(
"getId")->once()->withNoArgs()->andReturn($id);
36 $licenseRef->shouldReceive(
"getShortName")->once()->withNoArgs()->andReturn($shortName);
37 $licenseRef->shouldReceive(
"getFullName")->once()->withNoArgs()->andReturn($fullName);
39 $linkUrl = $this->urlBuilder->getLicenseTextUrl($licenseRef);
41 assertThat($linkUrl, is(
"<a title=\"$fullName\" href=\"javascript:;\" " .
42 "onclick=\"javascript:window.open('http://localhost/repo?mod=popup-license&rf=$id'," .
43 "'License text','width=600,height=400,toolbar=no,scrollbars=yes,resizable=yes');\">$shortName</a>"));
Traceback_uri()
Get the URI without query to this location.