Example #1
0
 function test_populated_widget()
 {
     $p = $this->factory->post->create(array('post_title' => 'Index Page', 'post_type' => 'page'));
     $p2 = $this->factory->post->create(array('post_title' => 'Test Post', 'post_type' => 'page'));
     $expected = sprintf(file_get_contents('tests/populated-widget.txt'), $p);
     $expected = preg_replace('/\\s{2,}|\\t|\\n/', '', $expected);
     $this->expectOutputString($expected);
     the_section_a_z_widget(array('before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>'), array('title' => 'Test Widget', 'post' => $p));
 }
Example #2
0
/**
 * @deprecated in favour of the_section_a_z_widget
 */
function the_section_az_widget($args, $instance)
{
    the_section_a_z_widget($args, $instance);
}