コード例 #1
0
 function testPrepareWPQuery()
 {
     global $wp_query;
     $dbi = new ComicPressDBInterface();
     $wp_query = (object) array('is_single' => false, 'in_the_loop' => false);
     $dbi->_prepare_wp_query();
     $this->assertTrue($wp_query->is_single);
     $this->assertTrue($wp_query->in_the_loop);
     $this->assertTrue(false === $dbi->is_single);
     $this->assertTrue(false === $dbi->in_the_loop);
 }