Changeset 51566
- Timestamp:
- 08/06/2021 09:55:31 PM (3 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/category/wpDropdownCategories.php
r51565 r51566 228 228 229 229 // Test to see if it contains the "required" attribute. 230 $this->assert NotRegExp( '/<select[^>]+required/', $dropdown_categories );230 $this->assertDoesNotMatchRegularExpression( '/<select[^>]+required/', $dropdown_categories ); 231 231 } 232 232 … … 252 252 253 253 // Test to see if it contains the "required" attribute. 254 $this->assert NotRegExp( '/<select[^>]+required/', $dropdown_categories );254 $this->assertDoesNotMatchRegularExpression( '/<select[^>]+required/', $dropdown_categories ); 255 255 } 256 256 } -
trunk/tests/phpunit/tests/category/wpListCategories.php
r51565 r51566 30 30 ); 31 31 32 $this->assert NotRegExp( '/class="[^"]*cat-item-' . $c1 . '[^"]*current-cat[^"]*"/', $found );32 $this->assertDoesNotMatchRegularExpression( '/class="[^"]*cat-item-' . $c1 . '[^"]*current-cat[^"]*"/', $found ); 33 33 $this->assertMatchesRegularExpression( '/class="[^"]*cat-item-' . $c2 . '[^"]*current-cat[^"]*"/', $found ); 34 34 } … … 51 51 52 52 $this->assertMatchesRegularExpression( '/class="[^"]*cat-item-' . $c1 . '[^"]*current-cat-parent[^"]*"/', $found ); 53 $this->assert NotRegExp( '/class="[^"]*cat-item-' . $c2 . '[^"]*current-cat-parent[^"]*"/', $found );53 $this->assertDoesNotMatchRegularExpression( '/class="[^"]*cat-item-' . $c2 . '[^"]*current-cat-parent[^"]*"/', $found ); 54 54 } 55 55 … … 69 69 70 70 $this->assertMatchesRegularExpression( '/class="[^"]*cat-item-' . $cats[0] . '[^"]*current-cat[^"]*"/', $found ); 71 $this->assert NotRegExp( '/class="[^"]*cat-item-' . $cats[1] . '[^"]*current[^"]*"/', $found );71 $this->assertDoesNotMatchRegularExpression( '/class="[^"]*cat-item-' . $cats[1] . '[^"]*current[^"]*"/', $found ); 72 72 $this->assertMatchesRegularExpression( '/class="[^"]*cat-item-' . $cats[2] . '[^"]*current-cat[^"]*"/', $found ); 73 73 } … … 653 653 $this->assertMatchesRegularExpression( '/class="[^"]*cat-item-' . $parent . '[^"]*current-cat-ancestor[^"]*"/', $actual ); 654 654 $this->assertMatchesRegularExpression( '/class="[^"]*cat-item-' . $child . '[^"]*current-cat-ancestor[^"]*"/', $actual ); 655 $this->assert NotRegExp( '/class="[^"]*cat-item-' . $grandchild . '[^"]*current-cat-ancestor[^"]*"/', $actual );656 $this->assert NotRegExp( '/class="[^"]*cat-item-' . $child2 . '[^"]*current-cat-ancestor[^"]*"/', $actual );655 $this->assertDoesNotMatchRegularExpression( '/class="[^"]*cat-item-' . $grandchild . '[^"]*current-cat-ancestor[^"]*"/', $actual ); 656 $this->assertDoesNotMatchRegularExpression( '/class="[^"]*cat-item-' . $child2 . '[^"]*current-cat-ancestor[^"]*"/', $actual ); 657 657 } 658 658 } -
trunk/tests/phpunit/tests/menu/walker-nav-menu-edit.php
r47198 r51566 56 56 $this->walker->start_el( $expected, (object) $item ); 57 57 58 $this->assert NotRegExp( '#<p class="link-to-original">\s*Original: <a href=""></a>#', $expected );58 $this->assertDoesNotMatchRegularExpression( '#<p class="link-to-original">\s*Original: <a href=""></a>#', $expected ); 59 59 } 60 60 } -
trunk/tests/phpunit/tests/post/getPostsByAuthorSql.php
r51565 r51566 40 40 public function test_full_false() { 41 41 $maybe_string = get_posts_by_author_sql( 'post', false ); 42 $this->assert NotRegExp( '/^WHERE /', $maybe_string );42 $this->assertDoesNotMatchRegularExpression( '/^WHERE /', $maybe_string ); 43 43 } 44 44 -
trunk/tests/phpunit/tests/post/nav-menu.php
r51565 r51566 462 462 // The markup should include whitespace between <li>'s. 463 463 $this->assertMatchesRegularExpression( '/\s<li.*>|<\/li>\s/U', $menu ); 464 $this->assert NotRegExp( '/<\/li><li.*>/U', $menu );464 $this->assertDoesNotMatchRegularExpression( '/<\/li><li.*>/U', $menu ); 465 465 466 466 // Whitespace suppressed. … … 474 474 475 475 // The markup should not include whitespace around <li>'s. 476 $this->assert NotRegExp( '/\s<li.*>|<\/li>\s/U', $menu );476 $this->assertDoesNotMatchRegularExpression( '/\s<li.*>|<\/li>\s/U', $menu ); 477 477 $this->assertMatchesRegularExpression( '/><li.*>|<\/li></U', $menu ); 478 478 } -
trunk/tests/phpunit/tests/post/template.php
r51565 r51566 320 320 ); 321 321 322 $this->assert NotRegExp( '/<select[^>]+class=\'/', $found );322 $this->assertDoesNotMatchRegularExpression( '/<select[^>]+class=\'/', $found ); 323 323 } 324 324 … … 427 427 // After falling back, the markup should include whitespace around <li>'s. 428 428 $this->assertMatchesRegularExpression( '/\s<li.*>|<\/li>\s/U', $menu ); 429 $this->assert NotRegExp( '/><li.*>|<\/li></U', $menu );429 $this->assertDoesNotMatchRegularExpression( '/><li.*>|<\/li></U', $menu ); 430 430 431 431 // No menus + wp_nav_menu() falls back to wp_page_menu(), this time without a container. … … 449 449 450 450 // After falling back, the markup should not include whitespace around <li>'s. 451 $this->assert NotRegExp( '/\s<li.*>|<\/li>\s/U', $menu );451 $this->assertDoesNotMatchRegularExpression( '/\s<li.*>|<\/li>\s/U', $menu ); 452 452 $this->assertMatchesRegularExpression( '/><li.*>|<\/li></U', $menu ); 453 453 -
trunk/tests/phpunit/tests/query/results.php
r51565 r51566 805 805 806 806 $this->assertNotEmpty( $posts2 ); 807 $this->assert NotRegExp( '#AND 1=0#', $this->q->request );807 $this->assertDoesNotMatchRegularExpression( '#AND 1=0#', $this->q->request ); 808 808 } 809 809 -
trunk/tests/phpunit/tests/query/search.php
r51462 r51566 260 260 ); 261 261 262 $this->assert NotRegExp( '|ORDER BY \(CASE[^\)]+\)|', $q->request );262 $this->assertDoesNotMatchRegularExpression( '|ORDER BY \(CASE[^\)]+\)|', $q->request ); 263 263 } 264 264
Note: See TracChangeset
for help on using the changeset viewer.