Changeset 35257
- Timestamp:
- 10/18/2015 04:50:15 AM (8 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r35242 r35257 525 525 global $wp_query; 526 526 $all = array( 527 'is_single', 'is_preview', 'is_page', 'is_archive', 'is_date', 'is_year', 'is_month', 'is_day', 'is_time', 528 'is_author', 'is_category', 'is_tag', 'is_tax', 'is_search', 'is_feed', 'is_comment_feed', 'is_trackback', 529 'is_home', 'is_404', 'is_comments_popup', 'is_paged', 'is_admin', 'is_attachment', 'is_singular', 'is_robots', 530 'is_posts_page', 'is_post_type_archive', 527 'is_404', 528 'is_admin', 529 'is_archive', 530 'is_attachment', 531 'is_author', 532 'is_category', 533 'is_comment_feed', 534 'is_comments_popup', 535 'is_date', 536 'is_day', 537 'is_embed', 538 'is_feed', 539 'is_home', 540 'is_month', 541 'is_page', 542 'is_paged', 543 'is_post_type_archive', 544 'is_posts_page', 545 'is_preview', 546 'is_robots', 547 'is_search', 548 'is_single', 549 'is_singular', 550 'is_tag', 551 'is_tax', 552 'is_time', 553 'is_trackback', 554 'is_year', 531 555 ); 532 556 $true = func_get_args(); … … 551 575 $message = ''; 552 576 if ( count($not_true) ) 553 $message .= implode( $not_true, ', ' ) . ' shouldbe true. ';577 $message .= implode( $not_true, ', ' ) . ' is expected to be true. '; 554 578 if ( count($not_false) ) 555 $message .= implode( $not_false, ', ' ) . ' shouldbe false.';579 $message .= implode( $not_false, ', ' ) . ' is expected to be false.'; 556 580 $this->assertTrue( $passed, $message ); 557 581 } -
trunk/tests/phpunit/tests/oembed/template.php
r35255 r35257 18 18 $this->go_to( get_post_embed_url( $post_id ) ); 19 19 20 $this->assertQueryTrue( 'is_single', 'is_singular' );20 $this->assertQueryTrue( 'is_single', 'is_singular', 'is_embed' ); 21 21 22 22 ob_start(); … … 44 44 $this->go_to( get_post_embed_url( $post_id ) ); 45 45 46 $this->assertQueryTrue( 'is_single', 'is_singular' );46 $this->assertQueryTrue( 'is_single', 'is_singular', 'is_embed' ); 47 47 48 48 ob_start(); … … 61 61 $GLOBALS['wp_query']->query_vars['embed'] = true; 62 62 63 $this->assertQueryTrue( 'is_404' );63 $this->assertQueryTrue( 'is_404', 'is_embed' ); 64 64 65 65 ob_start(); … … 84 84 $this->go_to( get_post_embed_url( $attachment_id ) ); 85 85 86 $this->assertQueryTrue( 'is_single', 'is_singular', 'is_attachment' );86 $this->assertQueryTrue( 'is_single', 'is_singular', 'is_attachment', 'is_embed' ); 87 87 88 88 ob_start(); … … 107 107 $this->go_to( get_post_embed_url( $post_id ) ); 108 108 109 $this->assertQueryTrue( 'is_404' );109 $this->assertQueryTrue( 'is_404', 'is_embed' ); 110 110 111 111 ob_start(); … … 129 129 $this->go_to( get_post_embed_url( $post_id ) ); 130 130 131 $this->assertQueryTrue( 'is_404' );131 $this->assertQueryTrue( 'is_404', 'is_embed' ); 132 132 133 133 ob_start(); … … 150 150 $this->go_to( get_post_embed_url( $post_id ) ); 151 151 152 $this->assertQueryTrue( 'is_404' );152 $this->assertQueryTrue( 'is_404', 'is_embed' ); 153 153 154 154 ob_start(); … … 175 175 $this->go_to( get_post_embed_url( $post_id ) ); 176 176 177 $this->assertQueryTrue( 'is_single', 'is_singular' );177 $this->assertQueryTrue( 'is_single', 'is_singular', 'is_embed' ); 178 178 179 179 ob_start();
Note: See TracChangeset
for help on using the changeset viewer.