Changeset 48937 for trunk/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r48200 r48937 92 92 global $_wp_switched_stack, $wpdb; 93 93 94 $this->assert Equals( array(), $_wp_switched_stack );94 $this->assertSame( array(), $_wp_switched_stack ); 95 95 $this->assertFalse( ms_is_switched() ); 96 96 $current_blog_id = get_current_blog_id(); … … 98 98 99 99 wp_cache_set( 'switch-test', $current_blog_id, 'switch-test' ); 100 $this->assert Equals( $current_blog_id, wp_cache_get( 'switch-test', 'switch-test' ) );100 $this->assertSame( $current_blog_id, wp_cache_get( 'switch-test', 'switch-test' ) ); 101 101 102 102 $blog_id = self::factory()->blog->create(); … … 105 105 switch_to_blog( $blog_id ); 106 106 $this->assertNotEquals( $cap_key, wp_get_current_user()->cap_key ); 107 $this->assert Equals( array( $current_blog_id ), $_wp_switched_stack );107 $this->assertSame( array( $current_blog_id ), $_wp_switched_stack ); 108 108 $this->assertTrue( ms_is_switched() ); 109 $this->assert Equals( $blog_id, $wpdb->blogid );109 $this->assertSame( $blog_id, $wpdb->blogid ); 110 110 $this->assertFalse( wp_cache_get( 'switch-test', 'switch-test' ) ); 111 111 wp_cache_set( 'switch-test', $blog_id, 'switch-test' ); 112 $this->assert Equals( $blog_id, wp_cache_get( 'switch-test', 'switch-test' ) );112 $this->assertSame( $blog_id, wp_cache_get( 'switch-test', 'switch-test' ) ); 113 113 114 114 switch_to_blog( $blog_id ); 115 $this->assert Equals( array( $current_blog_id, $blog_id ), $_wp_switched_stack );115 $this->assertSame( array( $current_blog_id, $blog_id ), $_wp_switched_stack ); 116 116 $this->assertTrue( ms_is_switched() ); 117 $this->assert Equals( $blog_id, $wpdb->blogid );118 $this->assert Equals( $blog_id, wp_cache_get( 'switch-test', 'switch-test' ) );117 $this->assertSame( $blog_id, $wpdb->blogid ); 118 $this->assertSame( $blog_id, wp_cache_get( 'switch-test', 'switch-test' ) ); 119 119 120 120 restore_current_blog(); 121 $this->assert Equals( array( $current_blog_id ), $_wp_switched_stack );121 $this->assertSame( array( $current_blog_id ), $_wp_switched_stack ); 122 122 $this->assertTrue( ms_is_switched() ); 123 $this->assert Equals( $blog_id, $wpdb->blogid );124 $this->assert Equals( $blog_id, wp_cache_get( 'switch-test', 'switch-test' ) );123 $this->assertSame( $blog_id, $wpdb->blogid ); 124 $this->assertSame( $blog_id, wp_cache_get( 'switch-test', 'switch-test' ) ); 125 125 126 126 restore_current_blog(); 127 $this->assert Equals( $cap_key, wp_get_current_user()->cap_key );128 $this->assert Equals( $current_blog_id, get_current_blog_id() );129 $this->assert Equals( array(), $_wp_switched_stack );127 $this->assertSame( $cap_key, wp_get_current_user()->cap_key ); 128 $this->assertSame( $current_blog_id, get_current_blog_id() ); 129 $this->assertSame( array(), $_wp_switched_stack ); 130 130 $this->assertFalse( ms_is_switched() ); 131 $this->assert Equals( $current_blog_id, wp_cache_get( 'switch-test', 'switch-test' ) );131 $this->assertSame( $current_blog_id, wp_cache_get( 'switch-test', 'switch-test' ) ); 132 132 133 133 $this->assertFalse( restore_current_blog() ); … … 154 154 155 155 // get_blogaddress_by_name(). 156 $this->assert Equals( 'http://' . $details->domain . $details->path, get_blogaddress_by_name( trim( $details->path, '/' ) ) );156 $this->assertSame( 'http://' . $details->domain . $details->path, get_blogaddress_by_name( trim( $details->path, '/' ) ) ); 157 157 158 158 // These are empty until get_blog_details() is called with $get_all = true. 159 $this->assert Equals( false,wp_cache_get( $blog_id, 'blog-details' ) );160 $this->assert Equals( false,wp_cache_get( $key, 'blog-lookup' ) );159 $this->assertFalse( wp_cache_get( $blog_id, 'blog-details' ) ); 160 $this->assertFalse( wp_cache_get( $key, 'blog-lookup' ) ); 161 161 162 162 // $get_all = true, populate the full blog-details cache and the blog slug lookup cache. … … 190 190 // Update the blog count cache to use get_blog_count(). 191 191 wp_update_network_counts(); 192 $this->assert Equals( 2, (int) get_blog_count() );192 $this->assertSame( 2, (int) get_blog_count() ); 193 193 } 194 194 … … 216 216 wp_suspend_cache_invalidation( $suspend ); 217 217 218 $this->assert Equals( $details->path, $new_details->path );218 $this->assertSame( $details->path, $new_details->path ); 219 219 } 220 220 … … 231 231 wpmu_delete_blog( $blog_id, false ); 232 232 233 $this->assert Equals( false,wp_cache_get( $blog_id, 'blog-details' ) );234 $this->assert Equals( false,wp_cache_get( $blog_id . 'short', 'blog-details' ) );235 $this->assert Equals( false,wp_cache_get( $key, 'blog-lookup' ) );236 $this->assert Equals( false,wp_cache_get( $key, 'blog-id-cache' ) );233 $this->assertFalse( wp_cache_get( $blog_id, 'blog-details' ) ); 234 $this->assertFalse( wp_cache_get( $blog_id . 'short', 'blog-details' ) ); 235 $this->assertFalse( wp_cache_get( $key, 'blog-lookup' ) ); 236 $this->assertFalse( wp_cache_get( $key, 'blog-id-cache' ) ); 237 237 } 238 238 … … 272 272 wpmu_delete_blog( $blog_id, true ); 273 273 274 $this->assert Equals( false,wp_cache_get( $blog_id, 'blog-details' ) );275 $this->assert Equals( false,wp_cache_get( $blog_id . 'short', 'blog-details' ) );276 $this->assert Equals( false,wp_cache_get( $key, 'blog-lookup' ) );277 $this->assert Equals( false,wp_cache_get( $key, 'blog-id-cache' ) );274 $this->assertFalse( wp_cache_get( $blog_id, 'blog-details' ) ); 275 $this->assertFalse( wp_cache_get( $blog_id . 'short', 'blog-details' ) ); 276 $this->assertFalse( wp_cache_get( $key, 'blog-lookup' ) ); 277 $this->assertFalse( wp_cache_get( $key, 'blog-id-cache' ) ); 278 278 } 279 279 … … 313 313 wpmu_delete_blog( $blog_id, true ); 314 314 315 $this->assert Equals( false,wp_cache_get( $blog_id, 'blog-details' ) );316 $this->assert Equals( false,wp_cache_get( $blog_id . 'short', 'blog-details' ) );317 $this->assert Equals( false,wp_cache_get( $key, 'blog-lookup' ) );318 $this->assert Equals( false,wp_cache_get( $key, 'blog-id-cache' ) );315 $this->assertFalse( wp_cache_get( $blog_id, 'blog-details' ) ); 316 $this->assertFalse( wp_cache_get( $blog_id . 'short', 'blog-details' ) ); 317 $this->assertFalse( wp_cache_get( $key, 'blog-lookup' ) ); 318 $this->assertFalse( wp_cache_get( $key, 'blog-id-cache' ) ); 319 319 } 320 320 … … 353 353 // Update the blog count cache to use get_blog_count(). 354 354 wp_update_network_counts(); 355 $this->assert Equals( 1, get_blog_count() );355 $this->assertSame( 1, get_blog_count() ); 356 356 } 357 357 … … 367 367 // Update the blog count cache to use get_blog_count(). 368 368 wp_update_network_counts(); 369 $this->assert Equals( 1, get_blog_count() );369 $this->assertSame( 1, get_blog_count() ); 370 370 } 371 371 … … 435 435 436 436 // When the cache is primed with an invalid site, the value is set to -1. 437 $this->assert Equals( -1, wp_cache_get( $blog_id, 'blog-details' ) );437 $this->assertSame( -1, wp_cache_get( $blog_id, 'blog-details' ) ); 438 438 439 439 // Create a site in the invalid site's place. … … 454 454 function test_update_blog_status() { 455 455 $result = update_blog_status( 1, 'spam', 0 ); 456 $this->assert Equals( 0, $result );456 $this->assertSame( 0, $result ); 457 457 } 458 458 … … 462 462 function test_update_blog_status_invalid_status() { 463 463 $result = update_blog_status( 1, 'doesnotexist', 'invalid' ); 464 $this->assert Equals( 'invalid', $result );464 $this->assertSame( 'invalid', $result ); 465 465 } 466 466 … … 476 476 $blog = get_site( $blog_id ); 477 477 478 $this->assert Equals( '0', $blog->spam );479 $this->assert Equals( 1, $test_action_counter );478 $this->assertSame( '0', $blog->spam ); 479 $this->assertSame( 1, $test_action_counter ); 480 480 481 481 // The action should not fire if the status of 'spam' stays the same. … … 483 483 $blog = get_site( $blog_id ); 484 484 485 $this->assert Equals( '0', $blog->spam );486 $this->assert Equals( 1, $test_action_counter );485 $this->assertSame( '0', $blog->spam ); 486 $this->assertSame( 1, $test_action_counter ); 487 487 488 488 remove_action( 'make_ham_blog', array( $this, '_action_counter_cb' ), 10 ); … … 499 499 $blog = get_site( $blog_id ); 500 500 501 $this->assert Equals( '1', $blog->spam );502 $this->assert Equals( 1, $test_action_counter );501 $this->assertSame( '1', $blog->spam ); 502 $this->assertSame( 1, $test_action_counter ); 503 503 504 504 // The action should not fire if the status of 'spam' stays the same. … … 506 506 $blog = get_site( $blog_id ); 507 507 508 $this->assert Equals( '1', $blog->spam );509 $this->assert Equals( 1, $test_action_counter );508 $this->assertSame( '1', $blog->spam ); 509 $this->assertSame( 1, $test_action_counter ); 510 510 511 511 remove_action( 'make_spam_blog', array( $this, '_action_counter_cb' ), 10 ); … … 522 522 $blog = get_site( $blog_id ); 523 523 524 $this->assert Equals( '1', $blog->archived );525 $this->assert Equals( 1, $test_action_counter );524 $this->assertSame( '1', $blog->archived ); 525 $this->assertSame( 1, $test_action_counter ); 526 526 527 527 // The action should not fire if the status of 'archived' stays the same. … … 529 529 $blog = get_site( $blog_id ); 530 530 531 $this->assert Equals( '1', $blog->archived );532 $this->assert Equals( 1, $test_action_counter );531 $this->assertSame( '1', $blog->archived ); 532 $this->assertSame( 1, $test_action_counter ); 533 533 534 534 remove_action( 'archive_blog', array( $this, '_action_counter_cb' ), 10 ); … … 546 546 $blog = get_site( $blog_id ); 547 547 548 $this->assert Equals( '0', $blog->archived );549 $this->assert Equals( 1, $test_action_counter );548 $this->assertSame( '0', $blog->archived ); 549 $this->assertSame( 1, $test_action_counter ); 550 550 551 551 // The action should not fire if the status of 'archived' stays the same. 552 552 update_blog_status( $blog_id, 'archived', 0 ); 553 553 $blog = get_site( $blog_id ); 554 $this->assert Equals( '0', $blog->archived );555 $this->assert Equals( 1, $test_action_counter );554 $this->assertSame( '0', $blog->archived ); 555 $this->assertSame( 1, $test_action_counter ); 556 556 557 557 remove_action( 'unarchive_blog', array( $this, '_action_counter_cb' ), 10 ); … … 568 568 $blog = get_site( $blog_id ); 569 569 570 $this->assert Equals( '1', $blog->deleted );571 $this->assert Equals( 1, $test_action_counter );570 $this->assertSame( '1', $blog->deleted ); 571 $this->assertSame( 1, $test_action_counter ); 572 572 573 573 // The action should not fire if the status of 'deleted' stays the same. … … 575 575 $blog = get_site( $blog_id ); 576 576 577 $this->assert Equals( '1', $blog->deleted );578 $this->assert Equals( 1, $test_action_counter );577 $this->assertSame( '1', $blog->deleted ); 578 $this->assertSame( 1, $test_action_counter ); 579 579 580 580 remove_action( 'make_delete_blog', array( $this, '_action_counter_cb' ), 10 ); … … 592 592 $blog = get_site( $blog_id ); 593 593 594 $this->assert Equals( '0', $blog->deleted );595 $this->assert Equals( 1, $test_action_counter );594 $this->assertSame( '0', $blog->deleted ); 595 $this->assertSame( 1, $test_action_counter ); 596 596 597 597 // The action should not fire if the status of 'deleted' stays the same. … … 599 599 $blog = get_site( $blog_id ); 600 600 601 $this->assert Equals( '0', $blog->deleted );602 $this->assert Equals( 1, $test_action_counter );601 $this->assertSame( '0', $blog->deleted ); 602 $this->assertSame( 1, $test_action_counter ); 603 603 604 604 remove_action( 'make_undelete_blog', array( $this, '_action_counter_cb' ), 10 ); … … 615 615 $blog = get_site( $blog_id ); 616 616 617 $this->assert Equals( '1', $blog->mature );618 $this->assert Equals( 1, $test_action_counter );617 $this->assertSame( '1', $blog->mature ); 618 $this->assertSame( 1, $test_action_counter ); 619 619 620 620 // The action should not fire if the status of 'mature' stays the same. … … 622 622 $blog = get_site( $blog_id ); 623 623 624 $this->assert Equals( '1', $blog->mature );625 $this->assert Equals( 1, $test_action_counter );624 $this->assertSame( '1', $blog->mature ); 625 $this->assertSame( 1, $test_action_counter ); 626 626 627 627 remove_action( 'mature_blog', array( $this, '_action_counter_cb' ), 10 ); … … 639 639 640 640 $blog = get_site( $blog_id ); 641 $this->assert Equals( '0', $blog->mature );642 $this->assert Equals( 1, $test_action_counter );641 $this->assertSame( '0', $blog->mature ); 642 $this->assertSame( 1, $test_action_counter ); 643 643 644 644 // The action should not fire if the status of 'mature' stays the same. … … 646 646 $blog = get_site( $blog_id ); 647 647 648 $this->assert Equals( '0', $blog->mature );649 $this->assert Equals( 1, $test_action_counter );648 $this->assertSame( '0', $blog->mature ); 649 $this->assertSame( 1, $test_action_counter ); 650 650 651 651 remove_action( 'unmature_blog', array( $this, '_action_counter_cb' ), 10 ); … … 662 662 663 663 $blog = get_site( $blog_id ); 664 $this->assert Equals( '0', $blog->public );665 $this->assert Equals( 1, $test_action_counter );664 $this->assertSame( '0', $blog->public ); 665 $this->assertSame( 1, $test_action_counter ); 666 666 667 667 // The action should not fire if the status of 'mature' stays the same. … … 669 669 $blog = get_site( $blog_id ); 670 670 671 $this->assert Equals( '0', $blog->public );672 $this->assert Equals( 1, $test_action_counter );671 $this->assertSame( '0', $blog->public ); 672 $this->assertSame( 1, $test_action_counter ); 673 673 674 674 remove_action( 'update_blog_public', array( $this, '_action_counter_cb' ), 10 ); … … 681 681 self::factory()->post->create(); 682 682 $post2 = self::factory()->post->create(); 683 $this->assert Equals( 2, get_site()->post_count );683 $this->assertSame( 2, get_site()->post_count ); 684 684 685 685 wp_delete_post( $post2 ); 686 $this->assert Equals( 1, get_site()->post_count );686 $this->assertSame( 1, get_site()->post_count ); 687 687 } 688 688 … … 693 693 update_option( 'blogname', 'foo' ); 694 694 $details = get_site( get_current_blog_id() ); 695 $this->assert Equals( 'foo', $details->blogname );695 $this->assertSame( 'foo', $details->blogname ); 696 696 697 697 update_option( 'blogname', 'bar' ); 698 698 $details = get_site( get_current_blog_id() ); 699 $this->assert Equals( 'bar', $details->blogname );699 $this->assertSame( 'bar', $details->blogname ); 700 700 } 701 701 … … 710 710 711 711 // Test the original response and cached response for the newly created site. 712 $this->assert Equals( $blog_id, get_blog_id_from_url( $details->domain, $details->path ) );713 $this->assert Equals( $blog_id, wp_cache_get( $key, 'blog-id-cache' ) );712 $this->assertSame( $blog_id, get_blog_id_from_url( $details->domain, $details->path ) ); 713 $this->assertSame( $blog_id, wp_cache_get( $key, 'blog-id-cache' ) ); 714 714 } 715 715 … … 726 726 $details = get_site( $blog_id ); 727 727 728 $this->assert Equals( $blog_id, get_blog_id_from_url( strtoupper( $details->domain ), strtoupper( $details->path ) ) );728 $this->assertSame( $blog_id, get_blog_id_from_url( strtoupper( $details->domain ), strtoupper( $details->path ) ) ); 729 729 } 730 730 … … 736 736 $details = get_site( $blog_id ); 737 737 738 $this->assert Equals( 0, get_blog_id_from_url( $details->domain, 'foo' ) );739 $this->assert Equals( -1, wp_cache_get( md5( $details->domain . 'foo' ), 'blog-id-cache' ) );738 $this->assertSame( 0, get_blog_id_from_url( $details->domain, 'foo' ) ); 739 $this->assertSame( -1, wp_cache_get( md5( $details->domain . 'foo' ), 'blog-id-cache' ) ); 740 740 } 741 741 … … 750 750 wpmu_delete_blog( $blog_id ); 751 751 752 $this->assert Equals( $blog_id, get_blog_id_from_url( $details->domain, $details->path ) );753 $this->assert Equals( $blog_id, wp_cache_get( $key, 'blog-id-cache' ) );752 $this->assertSame( $blog_id, get_blog_id_from_url( $details->domain, $details->path ) ); 753 $this->assertSame( $blog_id, wp_cache_get( $key, 'blog-id-cache' ) ); 754 754 } 755 755 … … 764 764 wpmu_delete_blog( $blog_id, true ); 765 765 766 $this->assert Equals( false,wp_cache_get( $key, 'blog-id-cache' ) );767 $this->assert Equals( 0, get_blog_id_from_url( $details->domain, $details->path ) );768 $this->assert Equals( -1, wp_cache_get( $key, 'blog-id-cache' ) );766 $this->assertFalse( wp_cache_get( $key, 'blog-id-cache' ) ); 767 $this->assertSame( 0, get_blog_id_from_url( $details->domain, $details->path ) ); 768 $this->assertSame( -1, wp_cache_get( $key, 'blog-id-cache' ) ); 769 769 } 770 770 … … 811 811 812 812 $info = wp_upload_dir(); 813 $this->assert Equals( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['url'] );814 $this->assert Equals( ABSPATH . 'wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['path'] );815 $this->assert Equals( gmstrftime( '/%Y/%m' ), $info['subdir'] );816 $this->assert Equals( '',$info['error'] );813 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['url'] ); 814 $this->assertSame( ABSPATH . 'wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['path'] ); 815 $this->assertSame( gmstrftime( '/%Y/%m' ), $info['subdir'] ); 816 $this->assertFalse( $info['error'] ); 817 817 818 818 $blog_id = self::factory()->blog->create(); … … 820 820 switch_to_blog( $blog_id ); 821 821 $info = wp_upload_dir(); 822 $this->assert Equals( 'http://' . $site->domain . '/wp-content/uploads/sites/' . get_current_blog_id() . '/' . gmstrftime( '%Y/%m' ), $info['url'] );823 $this->assert Equals( ABSPATH . 'wp-content/uploads/sites/' . get_current_blog_id() . '/' . gmstrftime( '%Y/%m' ), $info['path'] );824 $this->assert Equals( gmstrftime( '/%Y/%m' ), $info['subdir'] );825 $this->assert Equals( '',$info['error'] );822 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/sites/' . get_current_blog_id() . '/' . gmstrftime( '%Y/%m' ), $info['url'] ); 823 $this->assertSame( ABSPATH . 'wp-content/uploads/sites/' . get_current_blog_id() . '/' . gmstrftime( '%Y/%m' ), $info['path'] ); 824 $this->assertSame( gmstrftime( '/%Y/%m' ), $info['subdir'] ); 825 $this->assertFalse( $info['error'] ); 826 826 restore_current_blog(); 827 827 828 828 $info = wp_upload_dir(); 829 $this->assert Equals( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['url'] );830 $this->assert Equals( ABSPATH . 'wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['path'] );831 $this->assert Equals( gmstrftime( '/%Y/%m' ), $info['subdir'] );832 $this->assert Equals( '',$info['error'] );829 $this->assertSame( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['url'] ); 830 $this->assertSame( ABSPATH . 'wp-content/uploads/' . gmstrftime( '%Y/%m' ), $info['path'] ); 831 $this->assertSame( gmstrftime( '/%Y/%m' ), $info['subdir'] ); 832 $this->assertFalse( $info['error'] ); 833 833 } 834 834 … … 880 880 $details = get_site( 1 ); 881 881 882 $this->assert Equals( 1, domain_exists( $details->domain, $details->path ) );882 $this->assertSame( 1, domain_exists( $details->domain, $details->path ) ); 883 883 } 884 884 … … 886 886 $details = get_site( 1 ); 887 887 888 $this->assert Equals( 1, domain_exists( $details->domain, $details->path, $details->site_id ) );888 $this->assertSame( 1, domain_exists( $details->domain, $details->path, $details->site_id ) ); 889 889 } 890 890 … … 896 896 $details = get_site( 1 ); 897 897 898 $this->assert Equals( null,domain_exists( $details->domain, $details->path, 999 ) );898 $this->assertNull( domain_exists( $details->domain, $details->path, 999 ) ); 899 899 } 900 900 901 901 function test_invalid_domain_does_not_exist_with_default_site_id() { 902 $this->assert Equals( null,domain_exists( 'foo', 'bar' ) );902 $this->assertNull( domain_exists( 'foo', 'bar' ) ); 903 903 } 904 904 … … 907 907 $exists = domain_exists( 'foo', 'bar' ); 908 908 remove_filter( 'domain_exists', array( $this, '_domain_exists_cb' ), 10, 4 ); 909 $this->assert Equals( 1234, $exists );909 $this->assertSame( 1234, $exists ); 910 910 } 911 911 … … 921 921 922 922 // Make sure the same result is returned with or without a trailing slash. 923 $this->assert Equals( $exists1, $exists2 );923 $this->assertSame( $exists1, $exists2 ); 924 924 } 925 925 … … 929 929 function test_get_blogaddress_by_id_with_valid_id() { 930 930 $blogaddress = get_blogaddress_by_id( 1 ); 931 $this->assert Equals( 'http://' . WP_TESTS_DOMAIN . '/', $blogaddress );931 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/', $blogaddress ); 932 932 } 933 933 … … 937 937 function test_get_blogaddress_by_id_with_invalid_id() { 938 938 $blogaddress = get_blogaddress_by_id( 42 ); 939 $this->assert Equals( '', $blogaddress );939 $this->assertSame( '', $blogaddress ); 940 940 } 941 941 … … 1181 1181 1182 1182 clean_blog_cache( $site ); 1183 $this->assert Equals( $old_count + 1, did_action( 'clean_site_cache' ) );1183 $this->assertSame( $old_count + 1, did_action( 'clean_site_cache' ) ); 1184 1184 } 1185 1185 … … 1195 1195 clean_blog_cache( $site ); 1196 1196 wp_suspend_cache_invalidation( $suspend ); 1197 $this->assert Equals( $old_count, did_action( 'clean_site_cache' ) );1197 $this->assertSame( $old_count, did_action( 'clean_site_cache' ) ); 1198 1198 } 1199 1199 … … 1205 1205 1206 1206 clean_blog_cache( null ); 1207 $this->assert Equals( $old_count, did_action( 'clean_site_cache' ) );1207 $this->assertSame( $old_count, did_action( 'clean_site_cache' ) ); 1208 1208 } 1209 1209 … … 1215 1215 1216 1216 clean_blog_cache( 'something' ); 1217 $this->assert Equals( $old_count, did_action( 'clean_site_cache' ) );1217 $this->assertSame( $old_count, did_action( 'clean_site_cache' ) ); 1218 1218 } 1219 1219 … … 1444 1444 $this->assertTrue( $old_site->last_updated <= $value ); 1445 1445 } else { 1446 $this->assert Equals( $old_site->$key, $value );1446 $this->assertSame( $old_site->$key, $value ); 1447 1447 } 1448 1448 } … … 1541 1541 1542 1542 $this->assertInstanceOf( 'WP_Site', $result ); 1543 $this->assert Equals( $result->to_array(), $site->to_array() );1543 $this->assertSame( $result->to_array(), $site->to_array() ); 1544 1544 } 1545 1545 … … 2117 2117 $this->assertTrue( $result ); 2118 2118 $this->assertTrue( $initialized ); 2119 $this->assert Equals( $expected_options, $options );2120 $this->assert Equals( $expected_meta, $meta );2119 $this->assertSame( $expected_options, $options ); 2120 $this->assertSame( $expected_meta, $meta ); 2121 2121 } 2122 2122 … … 2215 2215 $this->assertTrue( $result ); 2216 2216 $this->assertTrue( $user_is_admin ); 2217 $this->assert Equals( get_userdata( 1 )->user_email, $admin_email );2217 $this->assertSame( get_userdata( 1 )->user_email, $admin_email ); 2218 2218 } 2219 2219 … … 2371 2371 // Should not hit blog_details cache initialised in $this->populate_options_callback tirggered during 2372 2372 // populate_options callback's call of get_blog_details. 2373 $this->assert Equals( 'http://testsite1.example.org/test', get_blog_details( $blog_id )->siteurl );2374 $this->assert Equals( 'http://testsite1.example.org/test', get_site( $blog_id )->siteurl );2373 $this->assertSame( 'http://testsite1.example.org/test', get_blog_details( $blog_id )->siteurl ); 2374 $this->assertSame( 'http://testsite1.example.org/test', get_site( $blog_id )->siteurl ); 2375 2375 2376 2376 remove_action( 'populate_options', array( $this, 'populate_options_callback' ) );
Note: See TracChangeset
for help on using the changeset viewer.