Exemplo n.º 1
0
 function test_runs_action()
 {
     global $called;
     $called = false;
     add_action('utcw_shortcode', create_function('', 'global $called; $called = true;'));
     $this->shortCode->render(array());
     $this->assertTrue($called, 'The shortcode handler should run the action utcw_shortcode');
 }
Exemplo n.º 2
0
 function test_function_and_shortcode_is_equal()
 {
     $utcw = UTCW_Plugin::getInstance();
     $shortCode = new UTCW_ShortCode($utcw);
     $this->expectOutputString($shortCode->render(array()));
     do_utcw(array());
 }
/**
 * Function for theme integration
 *
 * @param array $args
 *
 * @since 1.3
 */
function do_utcw(array $args)
{
    $plugin = UTCW_Plugin::getInstance();
    $shortCode = new UTCW_ShortCode($plugin);
    echo $shortCode->render($args);
}