Changeset 50935 for trunk/tests/phpunit/tests/term/getTerm.php
- Timestamp:
- 05/19/2021 10:10:58 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/term/getTerm.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getTerm.php
r50926 r50935 125 125 /** 126 126 * @ticket 14162 127 * @ticket 53235 127 128 */ 128 129 public function test_numeric_properties_should_be_cast_to_ints() { … … 134 135 $term_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->terms t JOIN $wpdb->term_taxonomy tt ON ( t.term_id = tt.term_id ) WHERE t.term_id = %d", $t ) ); 135 136 136 $found = get_term( $term_data ); 137 138 $this->assertInstanceOf( 'WP_Term', $found ); 139 $this->assertInternalType( 'int', $found->term_id ); 140 $this->assertInternalType( 'int', $found->term_taxonomy_id ); 141 $this->assertInternalType( 'int', $found->parent ); 142 $this->assertInternalType( 'int', $found->count ); 143 $this->assertInternalType( 'int', $found->term_group ); 137 $contexts = array( 'raw', 'edit', 'db', 'display', 'rss', 'attribute', 'js' ); 138 139 foreach ( $contexts as $context ) { 140 $found = get_term( $term_data, '', OBJECT, $context ); 141 142 $this->assertInstanceOf( 'WP_Term', $found ); 143 $this->assertInternalType( 'int', $found->term_id ); 144 $this->assertInternalType( 'int', $found->term_taxonomy_id ); 145 $this->assertInternalType( 'int', $found->parent ); 146 $this->assertInternalType( 'int', $found->count ); 147 $this->assertInternalType( 'int', $found->term_group ); 148 } 144 149 } 145 150
Note: See TracChangeset
for help on using the changeset viewer.