Changeset 12772 for trunk/tests/phpunit/testcases/blogs/template.php
- Timestamp:
- 10/30/2020 10:13:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/blogs/template.php
r12606 r12772 398 398 399 399 $blogs_template = $reset_blogs_template; 400 401 $this->assertTrue( $avatar === bp_core_fetch_avatar( array( 402 'type' => 'full', 403 'item_id' => $u, 404 'alt' => 'test', 405 'no_grav' => true, 406 'class' => 'avatar', 407 ) ) ); 400 $expected = bp_core_fetch_avatar( 401 array( 402 'type' => 'full', 403 'item_id' => $u, 404 'alt' => 'test', 405 'no_grav' => true, 406 'class' => 'avatar', 407 ) 408 ); 409 410 $this->assertTrue( $avatar === $expected ); 408 411 } 409 412 … … 445 448 } 446 449 450 /** 451 * @group avatar 452 * @group BP_Blogs_Template 453 * @group bp_get_blog_avatar 454 */ 455 public function test_bp_get_blog_default_avatar() { 456 if ( ! is_multisite() ) { 457 $this->markTestSkipped(); 458 } 459 460 global $blogs_template; 461 $reset_blogs_template = $blogs_template; 462 $blogs_template = null; 463 464 $u = self::factory()->user->create(); 465 $b = self::factory()->blog->create( array( 466 'title' => 'The Foo Bar Blog', 467 'user_id' => $u, 468 ) ); 469 470 $avatar = bp_get_blog_avatar( 471 array( 472 'type' => 'thumb', 473 'blog_id' => $b, 474 'html' => false, 475 ) 476 ); 477 478 $blogs_template = $reset_blogs_template; 479 $expected = buddypress()->plugin_url . "bp-core/images/mystery-blog-50.png"; 480 481 $this->assertTrue( $avatar === $expected ); 482 } 483 447 484 public function filter_blog_avatar() { 448 485 return BP_TESTS_DIR . 'assets/upside-down.jpg';
Note: See TracChangeset
for help on using the changeset viewer.