Make WordPress Core

Changeset 111 in tests for wp-testcase/test_query.php


Ignore:
Timestamp:
12/04/2007 12:25:32 PM (19 years ago)
Author:
tellyworth
Message:

more query tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_query.php

    r109 r111  
    116116                $this->assertQueryTrue('is_page');
    117117        }
     118       
     119        function test_page_trackback() {
     120                $pages = array('about', 'lorem-ipsum', 'parent-page', 'parent-page/child-page-1', 'parent-page/child-page-1/child-page-2');
     121                foreach ($pages as $page) {
     122                        $this->http("/{$page}/trackback/");
    118123               
     124                        $this->assertQueryTrue('is_page', 'is_trackback');
     125                }
     126        }
     127       
     128        function test_page_feed() {
     129                $pages = array('about', 'lorem-ipsum', 'parent-page', 'parent-page/child-page-1', 'parent-page/child-page-1/child-page-2');
     130                foreach ($pages as $page) {
     131                        $this->http("/{$page}/feed/");
     132               
     133                        $this->assertQueryTrue('is_page', 'is_feed', 'is_comment_feed');
     134                }
     135        }
     136
     137        function test_page_feed_atom() {
     138                $pages = array('about', 'lorem-ipsum', 'parent-page', 'parent-page/child-page-1', 'parent-page/child-page-1/child-page-2');
     139                foreach ($pages as $page) {
     140                        $this->http("/{$page}/feed/atom/");
     141               
     142                        $this->assertQueryTrue('is_page', 'is_feed', 'is_comment_feed');
     143                }
     144        }
     145       
     146        function test_page_page_2() {
     147                $pages = array('about', 'lorem-ipsum', 'parent-page', 'parent-page/child-page-1', 'parent-page/child-page-1/child-page-2');
     148                foreach ($pages as $page) {
     149                        $this->http("/{$page}/page/2/");
     150               
     151                        $this->assertQueryTrue('is_page', 'is_paged');
     152                }
     153        }
     154
     155        function test_page_page_2_short() {
     156                return $this->markTestSkipped();
     157                // identical to /about/page/2/ ?
     158                $this->http('/about/2/');
     159               
     160                $this->assertQueryTrue('is_page', 'is_paged');
     161        }
     162       
     163       
    119164}
    120165
Note: See TracChangeset for help on using the changeset viewer.