nav = new ComicPressNavigation(); } function testGetPostNav() { $dbi = $this->getMock('ComicPressDBInterface', array('get_previous_comic', 'get_next_comic')); wp_insert_post(array('ID' => 1)); $post = get_post(1); wp_set_post_categories(1, array(1)); $dbi->expects($this->once())->method('get_previous_comic')->with(null, $post); $dbi->expects($this->once())->method('get_next_comic')->with(null, $post); $this->nav->_dbi = $dbi; $this->nav->get_post_nav($post); } } ?>