function testCustomHierarchy()
 {
     $ch = curl_init('http://cctm:8888/wp-admin/post-new.php?post_type=room');
     curl_setopt($ch, CURLOPT_COOKIEFILE, $this->ckfile);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $haystack = curl_exec($ch);
     $needle = '<option class="level-0" value="28">123 Main Street (house)</option>';
     $this->assertTrue(in_html($needle, $haystack));
     curl_close($ch);
 }
 function test_summarize_posts3()
 {
     $str = '[summarize-posts post_type="movie" before="AAAA..." after="...ZZZZ" tpl="x.tpl" help="1"]';
     $actual = do_shortcode($str);
     $expected = 'AAAA...<li>FROM FILE: Letters from Iwo Jima</li><li>FROM FILE: Harry Potter</li><li>FROM FILE: Bourne Identity</li><li>FROM FILE: Fellowship of the Ring</li><li>FROM FILE: Lord of the Rings</li>...ZZZZ';
     $this->assertTrue(in_html($actual, $expected));
 }
    function test_pagination4()
    {
        $P = new CCTM_Pagination();
        $P->set_link_cnt(3);
        $actual = $P->paginate(100);
        $expected = '<div id="pagination">&nbsp;<span>1</span>&nbsp;&nbsp;<a href="?&offset=25" >2</a>&nbsp;&nbsp;<a href="?&offset=50" >3</a>&nbsp;&nbsp;<a href="?&offset=25" >Next &rsaquo;</a>&nbsp;<a href="?&offset=75" >Last &raquo;</a><br/>
				Page 1 of 4<br/>
				Displaying records 1 thru 25 of 100
			</div>';
        $this->assertTrue(in_html($actual, $expected));
    }
    function testSearchBy3()
    {
        $Q = new GetPostsForm();
        $Q->set_nonce_field('');
        // override nonce
        $Q->set_css('', false);
        // blank out CSS
        $Q->set_tpl('[+post_type.options+]');
        $actual = $Q->generate(array('post_type'));
        //print $Q->placeholders['post_type.options']; exit;
        //print $actual; exit;
        //print '<pre>'; print_r($Q->placeholders); print '</pre>';exit;
        $expected = '<option value="" >Select post-type</option>
			<option value="attachment" >attachment</option>
			<option value="house" >house</option>
			<option value="movie" >movie</option>
			<option value="page" >page</option>
			<option value="people" >people</option>
			<option value="post" >post</option>
			<option value="room" >room</option>
			<option value="snake" >snake</option>
			<option value="test" >test</option>';
        $this->assertTrue(in_html($expected, $actual));
    }