From a0a351a75dabd8e8590834b6ddfaaa632b9132e9 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 25 Aug 2015 21:50:55 +0000 Subject: [PATCH] Add some more data for Shortcode unit tests. Props miqrogroove. Fixes #33455. git-svn-id: https://develop.svn.wordpress.org/trunk@33740 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/shortcode.php | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/shortcode.php b/tests/phpunit/tests/shortcode.php index c43313c61a..bde37f8df8 100644 --- a/tests/phpunit/tests/shortcode.php +++ b/tests/phpunit/tests/shortcode.php @@ -4,7 +4,7 @@ */ class Tests_Shortcode extends WP_UnitTestCase { - protected $shortcodes = array( 'test-shortcode-tag', 'footag', 'bartag', 'baztag', 'dumptag', 'hyphen', 'hyphen-foo', 'hyphen-foo-bar' ); + protected $shortcodes = array( 'test-shortcode-tag', 'footag', 'bartag', 'baztag', 'dumptag', 'hyphen', 'hyphen-foo', 'hyphen-foo-bar', 'url' ); function setUp() { parent::setUp(); @@ -73,6 +73,10 @@ class Tests_Shortcode extends WP_UnitTestCase { return __FUNCTION__; } + function _shortcode_url() { + return 'http://www.wordpress.org/'; + } + function test_noatts() { do_shortcode('[test-shortcode-tag /]'); $this->assertEquals( '', $this->atts ); @@ -454,6 +458,30 @@ EOF; '[gallery]
Hello
[/gallery]', '', ), + array( + '[url]', + 'http://www.wordpress.org/', + ), + array( + '', + '', + ), + array( + '', + '', + ), + array( + '', + '', + ), + array( + '', + '', + ), + array( + '', + '', + ), ); }