Index: tests/phpunit/tests/general/paginateLinks.php
===================================================================
--- tests/phpunit/tests/general/paginateLinks.php	(revision 29711)
+++ tests/phpunit/tests/general/paginateLinks.php	(working copy)
@@ -124,14 +124,36 @@
 			'type'     => 'array',
 		) );
 
-		// It's supposed to link to page 1:
-		$this->assertTag( array( 'tag' => 'a', 'attributes' => array( 'href' => 'http://' . WP_TESTS_DOMAIN . '/' ) ), $links[0] );
-		$this->assertTag( array( 'tag' => 'a', 'attributes' => array( 'href' => 'http://' . WP_TESTS_DOMAIN . '/' ) ), $links[1] );
+		$expected_attributes = array(
+			0 => array(
+				'href'  => 'http://' . WP_TESTS_DOMAIN . '/',
+				'class' => 'prev page-numbers'
+			),
+			1 => array(
+				'href'  => 'http://' . WP_TESTS_DOMAIN . '/',
+				'class' => 'page-numbers'
+			)
+		);
 
-		// It's not supposed to have an empty href.
-		$this->assertNotTag( array( 'tag' => 'a', 'attributes' => array( 'class' => 'prev page-numbers', 'href' => '' ) ), $links[0] );
-		$this->assertNotTag( array( 'tag' => 'a', 'attributes' => array( 'class' => 'page-numbers',      'href' => '' ) ), $links[1] );
+		$document = new DOMDocument();
+		$document->preserveWhiteSpace = false;
 
+		// The first two links should link to page 1
+		foreach ( $expected_attributes as $link_idx => $attributes ) {
+
+			$document->loadHTML( $links[$link_idx] );
+			$tag = $document->getElementsByTagName( 'a' )->item( 0 );
+
+			$this->assertNotNull( $tag );
+
+			$href  = $tag->attributes->getNamedItem( 'href' )->value;
+			$class = $tag->attributes->getNamedItem( 'class' )->value;
+
+			$this->assertEquals( $attributes['href'], $href );
+			$this->assertEquals( $attributes['class'], $class );
+
+		}
+
 		// Current page: 1
 		$links = paginate_links( array(
 			'current'  => 1,
@@ -141,8 +163,24 @@
 			'type'     => 'array',
 		) );
 
-		$this->assertTag( array( 'tag' => 'span', 'attributes' => array( 'class' => 'current' ) ), $links[0] );
-		$this->assertTag( array( 'tag' => 'a',    'attributes' => array( 'href' => get_pagenum_link( 2 ) ) ), $links[1] );
+		$document->loadHTML( $links[0] );
+		$tag = $document->getElementsByTagName( 'span' )->item( 0 );
+
+		$this->assertNotNull( $tag );
+
+		$class = $tag->attributes->getNamedItem( 'class' )->value;
+
+		$this->assertEquals( 'page-numbers current', $class );
+
+		$document->loadHTML( $links[1] );
+		$tag = $document->getElementsByTagName( 'a' )->item( 0 );
+
+		$this->assertNotNull( $tag );
+
+		$href = $tag->attributes->getNamedItem( 'href' )->value;
+
+		$this->assertEquals( get_pagenum_link( 2 ), $href );
+
 	}
 
 }
