@@ -56,7 +56,7 @@ public function test_get_views_links( $link_data, $expected ) {
5656 */
5757 public function data_get_views_links () {
5858 return array (
59- 'one "current" link ' => array (
59+ 'one "current" link ' => array (
6060 'link_data ' => array (
6161 'all ' => array (
6262 'url ' => 'https://example.org/ ' ,
@@ -74,7 +74,7 @@ public function data_get_views_links() {
7474 'activated ' => '<a href="https://example.org/?status=activated">Activated</a> ' ,
7575 ),
7676 ),
77- 'two "current" links ' => array (
77+ 'two "current" links ' => array (
7878 'link_data ' => array (
7979 'all ' => array (
8080 'url ' => 'https://example.org/ ' ,
@@ -109,6 +109,30 @@ public function data_get_views_links() {
109109 'activated ' => '<a href="https://example.org/?status=activated">Activated</a> ' ,
110110 ),
111111 ),
112+ 'one "current" link with escapable characters ' => array (
113+ 'link_data ' => array (
114+ 'all ' => array (
115+ 'url ' => 'https://example.org/ ' ,
116+ 'label ' => 'All ' ,
117+ 'current ' => true ,
118+ ),
119+ 'activated ' => array (
120+ 'url ' => add_query_arg (
121+ array (
122+ 'status ' => 'activated ' ,
123+ 'sort ' => 'desc ' ,
124+ ),
125+ 'https://example.org/ '
126+ ),
127+ 'label ' => 'Activated ' ,
128+ 'current ' => false ,
129+ ),
130+ ),
131+ 'expected ' => array (
132+ 'all ' => '<a href="https://example.org/" class="current" aria-current="page">All</a> ' ,
133+ 'activated ' => '<a href="https://example.org/?status=activated&sort=desc">Activated</a> ' ,
134+ ),
135+ ),
112136 );
113137 }
114138
0 commit comments