Skip to content

Instantly share code, notes, and snippets.

@aaroncampbell
Created February 17, 2015 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaroncampbell/ca84226b29f33197c909 to your computer and use it in GitHub Desktop.
Save aaroncampbell/ca84226b29f33197c909 to your computer and use it in GitHub Desktop.
<?php
function test_multiple_shortcode_unautop() {
$test_strings = array(
"[footag][footag]\n",
"[footag]\n[footag]\n",
"[footag]\n\n[footag]\n",
);
foreach( $test_strings as $test_string ) {
$actual = shortcode_unautop( wpautop( $test_string ) );
$this->assertEquals( trim( $test_string ), trim( $actual ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment