Changeset 48937 for trunk/tests/phpunit/tests/general/archives.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/general/archives.php
r46586 r48937 33 33 $time1 = wp_cache_get( 'last_changed', 'posts' ); 34 34 $this->assertNotEmpty( $time1 ); 35 $this->assert Equals( $num_queries + 1, $wpdb->num_queries );35 $this->assertSame( $num_queries + 1, $wpdb->num_queries ); 36 36 37 37 $num_queries = $wpdb->num_queries; … … 45 45 ); 46 46 $this->assertInternalType( 'string', $result ); 47 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );48 $this->assert Equals( $num_queries, $wpdb->num_queries );47 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 48 $this->assertSame( $num_queries, $wpdb->num_queries ); 49 49 50 50 // Change args, resulting in a different query string. Cache is not primed, expect 1 query. … … 57 57 ); 58 58 $this->assertInternalType( 'string', $result ); 59 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );60 $this->assert Equals( $num_queries + 1, $wpdb->num_queries );59 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 60 $this->assertSame( $num_queries + 1, $wpdb->num_queries ); 61 61 62 62 $num_queries = $wpdb->num_queries; … … 71 71 ); 72 72 $this->assertInternalType( 'string', $result ); 73 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );74 $this->assert Equals( $num_queries, $wpdb->num_queries );73 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 74 $this->assertSame( $num_queries, $wpdb->num_queries ); 75 75 76 76 $num_queries = $wpdb->num_queries; … … 84 84 ); 85 85 $this->assertInternalType( 'string', $result ); 86 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );87 $this->assert Equals( $num_queries + 1, $wpdb->num_queries );86 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 87 $this->assertSame( $num_queries + 1, $wpdb->num_queries ); 88 88 89 89 $num_queries = $wpdb->num_queries; … … 97 97 ); 98 98 $this->assertInternalType( 'string', $result ); 99 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );100 $this->assert Equals( $num_queries, $wpdb->num_queries );99 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 100 $this->assertSame( $num_queries, $wpdb->num_queries ); 101 101 102 102 // Change type. Cache is not primed, expect 1 query. … … 108 108 ); 109 109 $this->assertInternalType( 'string', $result ); 110 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );111 $this->assert Equals( $num_queries + 1, $wpdb->num_queries );110 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 111 $this->assertSame( $num_queries + 1, $wpdb->num_queries ); 112 112 113 113 $num_queries = $wpdb->num_queries; … … 121 121 ); 122 122 $this->assertInternalType( 'string', $result ); 123 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );124 $this->assert Equals( $num_queries, $wpdb->num_queries );123 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 124 $this->assertSame( $num_queries, $wpdb->num_queries ); 125 125 126 126 // Change type. Cache is not primed, expect 1 query. … … 132 132 ); 133 133 $this->assertInternalType( 'string', $result ); 134 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );135 $this->assert Equals( $num_queries + 1, $wpdb->num_queries );134 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 135 $this->assertSame( $num_queries + 1, $wpdb->num_queries ); 136 136 137 137 $num_queries = $wpdb->num_queries; … … 145 145 ); 146 146 $this->assertInternalType( 'string', $result ); 147 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );148 $this->assert Equals( $num_queries, $wpdb->num_queries );147 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 148 $this->assertSame( $num_queries, $wpdb->num_queries ); 149 149 150 150 // Change type. Cache is not primed, expect 1 query. … … 156 156 ); 157 157 $this->assertInternalType( 'string', $result ); 158 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );159 $this->assert Equals( $num_queries + 1, $wpdb->num_queries );158 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 159 $this->assertSame( $num_queries + 1, $wpdb->num_queries ); 160 160 161 161 $num_queries = $wpdb->num_queries; … … 169 169 ); 170 170 $this->assertInternalType( 'string', $result ); 171 $this->assert Equals( $time1, wp_cache_get( 'last_changed', 'posts' ) );172 $this->assert Equals( $num_queries, $wpdb->num_queries );171 $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); 172 $this->assertSame( $num_queries, $wpdb->num_queries ); 173 173 } 174 174 }
Note: See TracChangeset
for help on using the changeset viewer.