diff --git src/includes/users/functions.php src/includes/users/functions.php
index 569970b..6e5396f 100644
|
|
|
function bbp_current_author_ip() {
|
| 147 | 147 | // Check for remote address |
| 148 | 148 | $remote_address = ! empty( $_SERVER['REMOTE_ADDR'] ) |
| 149 | 149 | ? $_SERVER['REMOTE_ADDR'] |
| 150 | | : '0.0.0.0'; |
| | 150 | : '127.0.0.1'; |
| 151 | 151 | |
| 152 | 152 | // Remove any unsavory bits |
| 153 | 153 | $retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', $remote_address ); |
diff --git tests/phpunit/includes/install.php tests/phpunit/includes/install.php
index 09a8a16..20ec273 100644
|
|
|
tests_add_filter( 'plugins_loaded', '_load_bbpress' );
|
| 31 | 31 | // Override some fussy global values |
| 32 | 32 | $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; |
| 33 | 33 | $_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN; |
| 34 | | $_SERVER['REMOTE_ADDR'] = '0.0.0.0'; |
| | 34 | $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; |
| 35 | 35 | |
| 36 | 36 | // Fix PHP identity crisis |
| 37 | 37 | $PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php'; |
diff --git tests/phpunit/includes/testcase.php tests/phpunit/includes/testcase.php
index 9935978..f6b64ba 100644
|
|
|
class BBP_UnitTestCase extends WP_UnitTestCase {
|
| 33 | 33 | if ( class_exists( 'BP_UnitTest_Factory' ) ) { |
| 34 | 34 | $this->bp_factory = new BP_UnitTest_Factory(); |
| 35 | 35 | } |
| | 36 | |
| | 37 | // Our default is ugly permalinks, so reset when needed. |
| | 38 | global $wp_rewrite; |
| | 39 | if ( $wp_rewrite->permalink_structure ) { |
| | 40 | $this->set_permalink_structure(); |
| | 41 | } |
| 36 | 42 | } |
| 37 | 43 | |
| 38 | 44 | function clean_up_global_scope() { |
| … |
… |
class BBP_UnitTestCase extends WP_UnitTestCase {
|
| 340 | 346 | global $wpdb; |
| 341 | 347 | $wpdb->query( 'COMMIT;' ); |
| 342 | 348 | } |
| | 349 | |
| | 350 | /** |
| | 351 | * Utility method that resets permalinks and flushes rewrites. |
| | 352 | * |
| | 353 | * @since 2.6.0 bbPress (rXXXX) |
| | 354 | * |
| | 355 | * @global WP_Rewrite $wp_rewrite |
| | 356 | * |
| | 357 | * @uses WP_UnitTestCase::set_permalink_structure() |
| | 358 | * |
| | 359 | * @param string $structure Optional. Permalink structure to set. Default empty. |
| | 360 | */ |
| | 361 | public function set_permalink_structure( $structure = '' ) { |
| | 362 | |
| | 363 | // Use WP 4.4+'s version if it exists. |
| | 364 | if ( method_exists( 'parent', 'set_permalink_structure' ) ) { |
| | 365 | parent::set_permalink_structure( $structure ); |
| | 366 | } else { |
| | 367 | global $wp_rewrite; |
| | 368 | |
| | 369 | $wp_rewrite->init(); |
| | 370 | $wp_rewrite->set_permalink_structure( $structure ); |
| | 371 | $wp_rewrite->flush_rules(); |
| | 372 | } |
| | 373 | } |
| 343 | 374 | } |
diff --git tests/phpunit/testcases/core/update.php tests/phpunit/testcases/core/update.php
index b4b848c..eebb360 100644
|
|
|
class BBP_Tests_Core_Update extends BBP_UnitTestCase {
|
| 131 | 131 | $this->assertSame( '1 day, 16 hours ago', bbp_get_forum_last_active_time( $forum_id ) ); |
| 132 | 132 | |
| 133 | 133 | // Topic meta |
| 134 | | $this->assertSame( '0.0.0.0', bbp_current_author_ip( $topic_id ) ); |
| | 134 | $this->assertSame( '127.0.0.1', bbp_current_author_ip( $topic_id ) ); |
| 135 | 135 | $this->assertSame( $forum_id, bbp_get_topic_forum_id( $topic_id ) ); |
| 136 | 136 | $this->assertSame( 1, bbp_get_topic_voice_count( $topic_id, true ) ); |
| 137 | 137 | $this->assertSame( 1, bbp_get_topic_reply_count( $topic_id, true ) ); |
| … |
… |
class BBP_Tests_Core_Update extends BBP_UnitTestCase {
|
| 141 | 141 | $this->assertSame( '1 day, 16 hours ago', bbp_get_topic_last_active_time( $topic_id ) ); |
| 142 | 142 | |
| 143 | 143 | // Reply Meta |
| 144 | | $this->assertSame( '0.0.0.0', bbp_current_author_ip( $reply_id ) ); |
| | 144 | $this->assertSame( '127.0.0.1', bbp_current_author_ip( $reply_id ) ); |
| 145 | 145 | $this->assertSame( $forum_id, bbp_get_reply_forum_id( $reply_id ) ); |
| 146 | 146 | $this->assertSame( $topic_id, bbp_get_reply_topic_id( $reply_id ) ); |
| 147 | 147 | } |
diff --git tests/phpunit/testcases/forums/functions/query.php tests/phpunit/testcases/forums/functions/query.php
index e711291..bbc0eb0 100644
|
|
|
class BBP_Tests_Forums_Functions_Query extends BBP_UnitTestCase {
|
| 47 | 47 | ), |
| 48 | 48 | ) ); |
| 49 | 49 | |
| 50 | | $this->assertEquals( array( $t1, $t2, $t3 ), bbp_forum_query_topic_ids( $f ) ); |
| | 50 | $this->assertEqualSets( array( $t1, $t2, $t3 ), bbp_forum_query_topic_ids( $f ) ); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
| … |
… |
class BBP_Tests_Forums_Functions_Query extends BBP_UnitTestCase {
|
| 64 | 64 | 'post_parent' => $f1, |
| 65 | 65 | ) ); |
| 66 | 66 | |
| 67 | | $this->assertEquals( array( $f2, $f3 ), bbp_forum_query_subforum_ids( $f1 ) ); |
| | 67 | $this->assertEqualSets( array( $f2, $f3 ), bbp_forum_query_subforum_ids( $f1 ) ); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
diff --git tests/phpunit/testcases/users/template/user.php tests/phpunit/testcases/users/template/user.php
index ea400ee..8a93cde 100644
|
|
|
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 24 | 24 | $this->set_current_user( $this->old_current_user ); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | | private function set_permalink_structure( $permalink_structure = '/%year%/%monthnum%/%day%/%postname%/' ) { |
| 28 | | global $wp_rewrite; |
| 29 | | $wp_rewrite->set_permalink_structure( $permalink_structure ); |
| 30 | | } |
| 31 | | |
| 32 | 27 | /** |
| 33 | 28 | * @covers ::bbp_user_id |
| 34 | 29 | * @covers ::bbp_get_user_id |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 129 | 124 | $display_name = $this->keymaster_userdata->display_name; |
| 130 | 125 | |
| 131 | 126 | // Pretty permalinks |
| 132 | | $this->set_permalink_structure(); |
| | 127 | $this->set_permalink_structure( '/%postname%/' ); |
| 133 | 128 | |
| 134 | 129 | $profile_link = '<a href="http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/" rel="nofollow">' . $display_name . '</a>'; |
| 135 | 130 | $user_profile_link = bbp_get_user_profile_link( $this->keymaster_id ); |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 144 | 139 | ob_clean(); |
| 145 | 140 | |
| 146 | 141 | // Ugly permalinks |
| 147 | | $this->set_permalink_structure( '' ); |
| | 142 | $this->set_permalink_structure(); |
| 148 | 143 | |
| 149 | 144 | $profile_link = '<a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '" rel="nofollow">' . $display_name . '</a>'; |
| 150 | 145 | $user_profile_link = bbp_get_user_profile_link( $this->keymaster_id ); |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 179 | 174 | public function test_bbp_get_user_profile_url() { |
| 180 | 175 | |
| 181 | 176 | // Pretty permalinks |
| 182 | | $this->set_permalink_structure(); |
| | 177 | $this->set_permalink_structure( '/%postname%/' ); |
| 183 | 178 | $profile_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/'; |
| 184 | 179 | $user_profile_url = bbp_get_user_profile_url( $this->keymaster_id ); |
| 185 | 180 | |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 193 | 188 | ob_clean(); |
| 194 | 189 | |
| 195 | 190 | // Ugly permalinks |
| 196 | | $this->set_permalink_structure( '' ); |
| | 191 | $this->set_permalink_structure(); |
| 197 | 192 | |
| 198 | 193 | $profile_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id; |
| 199 | 194 | $user_profile_url = bbp_get_user_profile_url( $this->keymaster_id ); |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 214 | 209 | $display_name = $this->keymaster_userdata->display_name; |
| 215 | 210 | |
| 216 | 211 | // Pretty permalinks |
| 217 | | $this->set_permalink_structure(); |
| | 212 | $this->set_permalink_structure( '/%postname%/' ); |
| 218 | 213 | $profile_edit_link = '<a href="http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/edit/" rel="nofollow">' . $display_name . '</a>'; |
| 219 | 214 | $user_profile_edit_link = bbp_get_user_profile_edit_link( $this->keymaster_id ); |
| 220 | 215 | |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 228 | 223 | ob_clean(); |
| 229 | 224 | |
| 230 | 225 | // Ugly permalinks |
| 231 | | $this->set_permalink_structure( '' ); |
| | 226 | $this->set_permalink_structure(); |
| 232 | 227 | $profile_edit_link = '<a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&edit=1" rel="nofollow">' . $display_name . '</a>'; |
| 233 | 228 | $user_profile_edit_link = bbp_get_user_profile_edit_link( $this->keymaster_id ); |
| 234 | 229 | |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 246 | 241 | public function test_bbp_user_profile_edit_url() { |
| 247 | 242 | |
| 248 | 243 | // Pretty permalinks |
| 249 | | $this->set_permalink_structure(); |
| | 244 | $this->set_permalink_structure( '/%postname%/' ); |
| 250 | 245 | $profile_edit_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/edit/'; |
| 251 | 246 | |
| 252 | 247 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 256 | 251 | ob_clean(); |
| 257 | 252 | |
| 258 | 253 | // Ugly permalinks |
| 259 | | $this->set_permalink_structure( '' ); |
| | 254 | $this->set_permalink_structure(); |
| 260 | 255 | $profile_edit_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&edit=1'; |
| 261 | 256 | |
| 262 | 257 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 270 | 265 | public function test_bbp_get_user_profile_edit_url() { |
| 271 | 266 | |
| 272 | 267 | // Pretty permalinks |
| 273 | | $this->set_permalink_structure(); |
| | 268 | $this->set_permalink_structure( '/%postname%/' ); |
| 274 | 269 | $profile_edit_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/edit/'; |
| 275 | 270 | |
| 276 | 271 | // String. |
| 277 | 272 | $this->assertSame( $profile_edit_url, bbp_get_user_profile_edit_url( $this->keymaster_id ) ); |
| 278 | 273 | |
| 279 | 274 | // Ugly permalinks |
| 280 | | $this->set_permalink_structure( '' ); |
| | 275 | $this->set_permalink_structure(); |
| 281 | 276 | $profile_edit_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&edit=1'; |
| 282 | 277 | |
| 283 | 278 | // String. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 323 | 318 | public function test_bbp_get_author_ip() { |
| 324 | 319 | $t = $this->factory->topic->create(); |
| 325 | 320 | |
| 326 | | $author_ip = '<span class="bbp-author-ip">(0.0.0.0)</span>'; |
| | 321 | $author_ip = '<span class="bbp-author-ip">(127.0.0.1)</span>'; |
| 327 | 322 | |
| 328 | 323 | // String. |
| 329 | 324 | $this->assertSame( $author_ip, bbp_get_author_ip( $t ) ); |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 375 | 370 | public function test_bbp_favorites_permalink() { |
| 376 | 371 | |
| 377 | 372 | // Pretty permalinks |
| 378 | | $this->set_permalink_structure(); |
| | 373 | $this->set_permalink_structure( '/%postname%/' ); |
| 379 | 374 | $favorites_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/favorites/'; |
| 380 | 375 | |
| 381 | 376 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 385 | 380 | ob_clean(); |
| 386 | 381 | |
| 387 | 382 | // Ugly permalinks |
| 388 | | $this->set_permalink_structure( '' ); |
| | 383 | $this->set_permalink_structure(); |
| 389 | 384 | $favorites_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&bbp_favs=favorites'; |
| 390 | 385 | |
| 391 | 386 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 399 | 394 | public function test_bbp_get_favorites_permalink() { |
| 400 | 395 | |
| 401 | 396 | // Pretty permalinks |
| 402 | | $this->set_permalink_structure(); |
| | 397 | $this->set_permalink_structure( '/%postname%/' ); |
| 403 | 398 | $favorites_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/favorites/'; |
| 404 | 399 | |
| 405 | 400 | // String. |
| 406 | 401 | $this->assertSame( $favorites_url, bbp_get_favorites_permalink( $this->keymaster_id ) ); |
| 407 | 402 | |
| 408 | 403 | // Ugly permalinks |
| 409 | | $this->set_permalink_structure( '' ); |
| | 404 | $this->set_permalink_structure(); |
| 410 | 405 | $favorites_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&bbp_favs=favorites'; |
| 411 | 406 | |
| 412 | 407 | // String. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 431 | 426 | public function test_bbp_subscriptions_permalink() { |
| 432 | 427 | |
| 433 | 428 | // Pretty permalinks |
| 434 | | $this->set_permalink_structure(); |
| | 429 | $this->set_permalink_structure( '/%postname%/' ); |
| 435 | 430 | $subscriptions_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/subscriptions/'; |
| 436 | 431 | |
| 437 | 432 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 441 | 436 | ob_clean(); |
| 442 | 437 | |
| 443 | 438 | // Ugly permalinks |
| 444 | | $this->set_permalink_structure( '' ); |
| | 439 | $this->set_permalink_structure(); |
| 445 | 440 | $subscriptions_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&bbp_subs=subscriptions'; |
| 446 | 441 | |
| 447 | 442 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 455 | 450 | public function test_bbp_get_subscriptions_permalink() { |
| 456 | 451 | |
| 457 | 452 | // Pretty permalinks |
| 458 | | $this->set_permalink_structure(); |
| | 453 | $this->set_permalink_structure( '/%postname%/' ); |
| 459 | 454 | $subscriptions_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/subscriptions/'; |
| 460 | 455 | |
| 461 | 456 | // String. |
| 462 | 457 | $this->assertSame( $subscriptions_url, bbp_get_subscriptions_permalink( $this->keymaster_id ) ); |
| 463 | 458 | |
| 464 | 459 | // Ugly permalinks |
| 465 | | $this->set_permalink_structure( '' ); |
| | 460 | $this->set_permalink_structure(); |
| 466 | 461 | $subscriptions_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&bbp_subs=subscriptions'; |
| 467 | 462 | |
| 468 | 463 | // String. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 564 | 559 | public function test_bbp_user_topics_created_url() { |
| 565 | 560 | |
| 566 | 561 | // Pretty permalinks |
| 567 | | $this->set_permalink_structure(); |
| | 562 | $this->set_permalink_structure( '/%postname%/' ); |
| 568 | 563 | $topics_created_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/topics/'; |
| 569 | 564 | |
| 570 | 565 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 574 | 569 | ob_clean(); |
| 575 | 570 | |
| 576 | 571 | // Ugly permalinks |
| 577 | | $this->set_permalink_structure( '' ); |
| | 572 | $this->set_permalink_structure(); |
| 578 | 573 | $topics_created_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&bbp_tops=1'; |
| 579 | 574 | |
| 580 | 575 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 588 | 583 | public function test_bbp_get_user_topics_created_url() { |
| 589 | 584 | |
| 590 | 585 | // Pretty permalinks |
| 591 | | $this->set_permalink_structure(); |
| | 586 | $this->set_permalink_structure( '/%postname%/' ); |
| 592 | 587 | $topics_created_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/topics/'; |
| 593 | 588 | |
| 594 | 589 | // String. |
| 595 | 590 | $this->assertSame( $topics_created_url, bbp_get_user_topics_created_url( $this->keymaster_id ) ); |
| 596 | 591 | |
| 597 | 592 | // Ugly permalinks |
| 598 | | $this->set_permalink_structure( '' ); |
| | 593 | $this->set_permalink_structure(); |
| 599 | 594 | $topics_created_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '&bbp_tops=1'; |
| 600 | 595 | |
| 601 | 596 | // String. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 608 | 603 | public function test_bbp_user_replies_created_url() { |
| 609 | 604 | |
| 610 | 605 | // Pretty permalinks |
| 611 | | $this->set_permalink_structure(); |
| | 606 | $this->set_permalink_structure( '/%postname%/' ); |
| 612 | 607 | $replies_created_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/replies/'; |
| 613 | 608 | |
| 614 | 609 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 618 | 613 | ob_clean(); |
| 619 | 614 | |
| 620 | 615 | // Ugly permalinks |
| 621 | | $this->set_permalink_structure( '' ); |
| | 616 | $this->set_permalink_structure(); |
| 622 | 617 | $replies_created_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user='. $this->keymaster_id . '&bbp_reps=1'; |
| 623 | 618 | |
| 624 | 619 | // Output. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 632 | 627 | public function test_bbp_get_user_replies_created_url() { |
| 633 | 628 | |
| 634 | 629 | // Pretty permalinks |
| 635 | | $this->set_permalink_structure(); |
| | 630 | $this->set_permalink_structure( '/%postname%/' ); |
| 636 | 631 | $replies_created_url = 'http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/replies/'; |
| 637 | 632 | |
| 638 | 633 | // String. |
| 639 | 634 | $this->assertSame( $replies_created_url, bbp_get_user_replies_created_url( $this->keymaster_id ) ); |
| 640 | 635 | |
| 641 | 636 | // Ugly permalinks |
| 642 | | $this->set_permalink_structure( '' ); |
| | 637 | $this->set_permalink_structure(); |
| 643 | 638 | $replies_created_url = 'http://' . WP_TESTS_DOMAIN . '/?bbp_user='. $this->keymaster_id . '&bbp_reps=1'; |
| 644 | 639 | |
| 645 | 640 | // String. |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 714 | 709 | $wp_avatar = get_avatar( $current_user, $size ); |
| 715 | 710 | |
| 716 | 711 | // Pretty permalinks |
| 717 | | $this->set_permalink_structure(); |
| | 712 | $this->set_permalink_structure( '/%postname%/' ); |
| 718 | 713 | $author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/" title="View ' . $display_name . |
| 719 | 714 | ''s profile" class="bbp-author-avatar" rel="nofollow">' . $wp_avatar . |
| 720 | 715 | '</a> <a href="http://' . WP_TESTS_DOMAIN . '/forums/user/' . $this->keymaster_userdata->user_nicename . '/" title="View ' . $display_name . |
| … |
… |
class BBP_Tests_Users_Template_User extends BBP_UnitTestCase {
|
| 730 | 725 | ob_clean(); |
| 731 | 726 | |
| 732 | 727 | // Ugly permalinks |
| 733 | | $this->set_permalink_structure( '' ); |
| | 728 | $this->set_permalink_structure(); |
| 734 | 729 | $author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '" title="View ' . $display_name . |
| 735 | 730 | ''s profile" class="bbp-author-avatar" rel="nofollow">' . $wp_avatar . |
| 736 | 731 | '</a> <a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '" title="View ' . $display_name . |