26 return "http://localhost/repo";
34 protected function setUp()
39 public function testGetLicenseTextLink()
42 $shortName =
"<shortName>";
43 $fullName =
"<fullName>";
45 $licenseRef = M::mock(LicenseRef::class);
46 $licenseRef->shouldReceive(
"getId")->once()->withNoArgs()->andReturn($id);
47 $licenseRef->shouldReceive(
"getShortName")->once()->withNoArgs()->andReturn($shortName);
48 $licenseRef->shouldReceive(
"getFullName")->once()->withNoArgs()->andReturn($fullName);
50 $linkUrl = $this->urlBuilder->getLicenseTextUrl($licenseRef);
52 assertThat($linkUrl, is(
"<a title=\"$fullName\" href=\"javascript:;\" " .
53 "onclick=\"javascript:window.open('http://localhost/repo?mod=popup-license&rf=$id'," .
54 "'License text','width=600,height=400,toolbar=no,scrollbars=yes,resizable=yes');\">$shortName</a>"));
Traceback_uri()
Get the URI without query to this location.