Esempio n. 1
0
 /**
  * Get the HTML for a link page link.
  *
  * @param int $page The page number.
  * @param string $text The text to display.
  * @return string The HTML for a single page link.
  */
 protected function get_link_html($page, $text)
 {
     $url = new \pdyn\datatype\Url($this->baseurl);
     $url->addquery('p=' . $page);
     return '<a href="' . (string) $url . '" data-page="' . $page . '" class="page_link jump_link ' . $this->linkclasses . '">' . $text . '</a>';
 }
Esempio n. 2
0
 /**
  * Test get_domain function.
  *
  * @dataProvider dataprovider_getDomain
  * @param string $test The test URL.
  * @param string $includesubdomains Whether to include subdomains.
  * @param string $expected The expected output.
  */
 public function test_getDomain($test, $includesubdomains, $expected)
 {
     $url = new \pdyn\datatype\Url($test);
     $actual = $url->get_domain($includesubdomains);
     $this->assertEquals($expected, $actual);
 }