Skip to content

Instantly share code, notes, and snippets.

@ounziw
Created August 7, 2013 01:30
Show Gist options
  • Save ounziw/6170447 to your computer and use it in GitHub Desktop.
Save ounziw/6170447 to your computer and use it in GitHub Desktop.
Test for wpautop function > http://ja.forums.wordpress.org/topic/24066
<?php
class WpautopTest extends PHPUnit_Framework_TestCase {
function autop_provider()
{
return array(
array("<div>abcde\n\n</div>","<div>abcde\n</div>\n"),
array("<section>abcde\n\n</section>","<section>abcde\n</section>\n"),
);
}
/**
* @dataProvider autop_provider
*/
function test_double_nl($input,$expected)
{
$output = wpautop($input);
$this->assertEquals($expected, $output);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment