Changeset 27187
- Timestamp:
- 02/17/2014 10:10:57 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/conditionals.php
r27016 r27187 677 677 678 678 $post = get_queried_object(); 679 $q = $GLOBALS['wp_query']; 679 680 680 681 $this->assertTrue( is_single() ); 682 $this->assertTrue( $q->is_single ); 683 $this->assertFalse( $q->is_page ); 684 $this->assertFalse( $q->is_attachment ); 681 685 $this->assertTrue( is_single( $post ) ); 682 686 $this->assertTrue( is_single( $post->ID ) ); … … 690 694 691 695 $post = get_queried_object(); 696 $q = $GLOBALS['wp_query']; 692 697 693 698 $this->assertTrue( is_page() ); 699 $this->assertFalse( $q->is_single ); 700 $this->assertTrue( $q->is_page ); 701 $this->assertFalse( $q->is_attachment ); 694 702 $this->assertTrue( is_page( $post ) ); 695 703 $this->assertTrue( is_page( $post->ID ) ); … … 703 711 704 712 $post = get_queried_object(); 713 $q = $GLOBALS['wp_query']; 705 714 706 715 $this->assertTrue( is_attachment() ); 716 $this->assertTrue( is_single() ); 717 $this->assertTrue( $q->is_attachment ); 718 $this->assertTrue( $q->is_single ); 719 $this->assertFalse( $q->is_page ); 707 720 $this->assertTrue( is_attachment( $post ) ); 708 721 $this->assertTrue( is_attachment( $post->ID ) );
Note: See TracChangeset
for help on using the changeset viewer.