/** * last page: next inactive * */ public function test_nextlink_inactive() { Pagination::set_config(array('current_page' => 2)); $output = Pagination::next_link('next'); $expected = ' <span class="next-inactive"><a href="#">next »</a> </span>'; $this->assertEquals($expected, $output); }
public static function after_link() { if (isset($_GET['p'])) { # Get the value from HTTP-GET $get_page = (int) $_GET['p']; } if (empty($get_page)) { $get_page = 1; } if (isset($get_page)) { self::$next_link = $get_page + 1; } $after = self::$after_link; $min = $get_page - 1; if ($min < 1) { $min = 1; } $controller = Get_url::get_url('controller'); $method = Get_url::get_url('method'); $url = "?{$controller}={$method}={$min}"; echo "href='{$url}'>"; }