Changeset 50926
- Timestamp:
- 05/18/2021 09:04:31 PM (5 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 5 edited
-
l10n/loadTextdomainJustInTime.php (modified) (1 diff)
-
term/cache.php (modified) (1 diff)
-
term/getTerm.php (modified) (1 diff)
-
term/getTermBy.php (modified) (4 diffs)
-
user/updateUserCaches.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n/loadTextdomainJustInTime.php
r50463 r50926 111 111 remove_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) ); 112 112 113 $this->assert True( $translations instanceof NOOP_Translations );113 $this->assertInstanceOf( 'NOOP_Translations', $translations ); 114 114 } 115 115 -
trunk/tests/phpunit/tests/term/cache.php
r48939 r50926 434 434 $term = get_term_by( 'name', 'Burrito', 'post_tag' ); 435 435 $num_queries++; 436 $this->assert True( $term instanceof WP_Term );436 $this->assertInstanceOf( 'WP_Term', $term ); 437 437 $this->assertSame( $term_id, $term->term_id ); 438 438 $this->assertSame( $num_queries, $wpdb->num_queries ); -
trunk/tests/phpunit/tests/term/getTerm.php
r48937 r50926 136 136 $found = get_term( $term_data ); 137 137 138 $this->assert True( $found instanceof WP_Term);138 $this->assertInstanceOf( 'WP_Term', $found ); 139 139 $this->assertInternalType( 'int', $found->term_id ); 140 140 $this->assertInternalType( 'int', $found->term_taxonomy_id ); -
trunk/tests/phpunit/tests/term/getTermBy.php
r48937 r50926 126 126 $num_queries++; 127 127 128 $this->assert True( $found instanceof WP_Term);128 $this->assertInstanceOf( 'WP_Term', $found ); 129 129 $this->assertSame( $t, $found->term_id ); 130 130 $this->assertSame( $num_queries, $wpdb->num_queries ); … … 152 152 $found = get_term_by( 'name', $term_name_slashed, 'wptests_tax' ); 153 153 154 $this->assert True( $found instanceof WP_Term);154 $this->assertInstanceOf( 'WP_Term', $found ); 155 155 $this->assertSame( $t, $found->term_id ); 156 156 $this->assertSame( $term_name, $found->name ); … … 172 172 $found1 = get_term_by( 'slug', 'foo foo', 'wptests_tax' ); 173 173 174 $this->assert True( $found1 instanceof WP_Term);174 $this->assertInstanceOf( 'WP_Term', $found1 ); 175 175 $this->assertSame( $t1, $found1->term_id ); 176 176 … … 185 185 $found2 = get_term_by( 'slug', '仪表盘', 'wptests_tax' ); 186 186 187 $this->assert True( $found2 instanceof WP_Term);187 $this->assertInstanceOf( 'WP_Term', $found2 ); 188 188 $this->assertSame( $t2, $found2->term_id ); 189 189 } -
trunk/tests/phpunit/tests/user/updateUserCaches.php
r48937 r50926 65 65 66 66 $cached = wp_cache_get( $u, 'users' ); 67 $this->assert False( $cached instanceof WP_User);67 $this->assertNotInstanceOf( 'WP_User', $cached ); 68 68 $this->assertEquals( $raw_userdata, $cached ); 69 69 }
Note: See TracChangeset
for help on using the changeset viewer.