- Timestamp:
- 07/19/2021 02:00:11 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/category/wpDropdownCategories.php
r46586 r51462 26 26 27 27 // Test to see if it returns the default with the category ID. 28 $this->assert Contains( 'value="' . $cat_id . '"', $dropdown_default );28 $this->assertStringContainsString( 'value="' . $cat_id . '"', $dropdown_default ); 29 29 } 30 30 … … 51 51 52 52 // Test to see if it returns the default with the category ID. 53 $this->assert Contains( 'value="' . $cat_id . '"', $found );53 $this->assertStringContainsString( 'value="' . $cat_id . '"', $found ); 54 54 } 55 55 … … 76 76 77 77 // Test to see if it returns the default with the category slug. 78 $this->assert Contains( 'value="test_category"', $found );78 $this->assertStringContainsString( 'value="test_category"', $found ); 79 79 } 80 80 … … 101 101 102 102 // Test to see if it returns the default with the category slug. 103 $this->assert Contains( 'value="' . $cat_id . '"', $found );103 $this->assertStringContainsString( 'value="' . $cat_id . '"', $found ); 104 104 } 105 105 … … 131 131 ); 132 132 133 $this->assert Contains( 'value="test_category_2" selected="selected"', $found );133 $this->assertStringContainsString( 'value="test_category_2" selected="selected"', $found ); 134 134 } 135 135 … … 149 149 ); 150 150 151 $this->assert Contains( "value='0' selected='selected'", $found );151 $this->assertStringContainsString( "value='0' selected='selected'", $found ); 152 152 153 153 foreach ( $cats as $cat ) { 154 154 $_cat = get_term( $cat, 'category' ); 155 $this->assert NotContains( 'value="' . $_cat->slug . '" selected="selected"', $found );155 $this->assertStringNotContainsString( 'value="' . $_cat->slug . '" selected="selected"', $found ); 156 156 } 157 157 } … … 173 173 ); 174 174 175 $this->assert Contains( "value='0' selected='selected'", $found );175 $this->assertStringContainsString( "value='0' selected='selected'", $found ); 176 176 177 177 foreach ( $cats as $cat ) { 178 178 $_cat = get_term( $cat, 'category' ); 179 $this->assert NotContains( 'value="' . $_cat->slug . '" selected="selected"', $found );179 $this->assertStringNotContainsString( 'value="' . $_cat->slug . '" selected="selected"', $found ); 180 180 } 181 181 }
Note: See TracChangeset
for help on using the changeset viewer.