Index: tests/phpunit/testcases/replies/template/loop.php
===================================================================
--- tests/phpunit/testcases/replies/template/loop.php	(revision 5924)
+++ tests/phpunit/testcases/replies/template/loop.php	(working copy)
@@ -21,6 +21,64 @@
 	}
 
 	/**
+     * @ticket BBP2702
+     */
+	public function test_replies_pagination_when_pages_are_greater_than_nine() {
+
+		$bbp = bbpress();
+
+		if ( is_multisite() ) {
+			$this->markTestSkipped( 'Skipping URL tests in multiste for now.' );
+		}
+
+		$f = $this->factory->forum->create();
+		$t = $this->factory->topic->create( array(
+			'post_parent' => $f,
+			'topic_meta' => array(
+				'forum_id' => $f,
+			),
+		) );
+
+		$r = $this->factory->reply->create_many( 15, array(
+			'post_parent' => $t,
+			'reply_meta' => array(
+				'forum_id' => $f,
+				'topic_id' => $t,
+			),
+		) );
+
+		// Default query args from bbp_has_replies are going to be used as the args
+		$args = array(
+			'posts_per_page' => 1, 		// use 1 per page for testing
+		);
+
+		$request_uri = $_SERVER['REQUEST_URI'];
+ 	    $_SERVER['REQUEST_URI'] = add_query_arg( 'topic=' . $t, '', $request_uri );
+
+ 	    // test unpretty permalinks (default)
+		bbp_has_replies( $args );
+
+		$paged_link = $_SERVER['REQUEST_URI'] . '&#038;paged=';
+		$page2 = $paged_link . '2';
+		$page16 = $paged_link . '16';
+
+		$expected =<<<EXPECTED
+<span class='page-numbers current'>1</span>
+<a class='page-numbers' href='$page2'>2</a>
+<span class="page-numbers dots">&hellip;</span>
+<a class='page-numbers' href='$page16'>16</a>
+<a class="next page-numbers" href="$page2">&rarr;</a>
+EXPECTED;
+
+		$links = bbp_get_topic_pagination_links();
+		$this->assertEquals( $expected, $links );
+
+		$_SERVER['REQUEST_URI'] = $request_uri;
+
+	}
+
+
+	/**
 	 * @covers ::bbp_replies
 	 * @todo   Implement test_bbp_replies().
 	 */
Index: tests/phpunit/testcases/topics/template/loop.php
===================================================================
--- tests/phpunit/testcases/topics/template/loop.php	(revision 5924)
+++ tests/phpunit/testcases/topics/template/loop.php	(working copy)
@@ -21,6 +21,55 @@
 	}
 
 	/**
+     * @ticket BBP2702
+     */
+	public function test_topics_pagination_when_pages_are_greater_than_nine() {
+
+		$bbp = bbpress();
+
+		if ( is_multisite() ) {
+			$this->markTestSkipped( 'Skipping URL tests in multiste for now.' );
+		}
+
+		$f = $this->factory->forum->create();
+		$t = $this->factory->topic->create_many( 15, array(
+			'post_parent' => $f,
+			'topic_meta' => array(
+				'forum_id' => $f,
+			),
+		) );
+
+		// Default query args from bbp_has_replies are going to be used as the args
+		$args = array(
+			'posts_per_page' => 1, 		// use 1 per page for testing
+		);
+
+		$request_uri = $_SERVER['REQUEST_URI'];
+ 	    $_SERVER['REQUEST_URI'] = add_query_arg( 'forum=' . $f, '', $request_uri );
+
+ 	    // test unpretty permalinks (default)
+		bbp_has_replies( $args );
+
+		$paged_link = $_SERVER['REQUEST_URI'] . '&#038;paged=';
+		$page2 = $paged_link . '2';
+		$page15 = $paged_link . '15';
+
+		$expected =<<<EXPECTED
+<span class='page-numbers current'>1</span>
+<a class='page-numbers' href='$page2'>2</a>
+<span class="page-numbers dots">&hellip;</span>
+<a class='page-numbers' href='$page15'>15</a>
+<a class="next page-numbers" href="$page2">&rarr;</a>
+EXPECTED;
+
+		$links = bbp_get_topic_pagination_links();
+		$this->assertEquals( $expected, $links );
+
+		$_SERVER['REQUEST_URI'] = $request_uri;
+
+	}
+
+	/**
 	 * @covers ::bbp_topics
 	 * @todo   Implement test_bbp_topics().
 	 */
