test object links

This commit is contained in:
Matthias Pfefferle 2019-08-18 22:23:34 +02:00
parent bdd9bd8775
commit c9c05e263f

View file

@ -1,5 +1,9 @@
<?php <?php
class Test_Activitypub_Hashtag extends WP_UnitTestCase { class Test_Activitypub_Hashtag extends WP_UnitTestCase {
protected function setUp() {
wp_create_tag( 'object' );
}
/** /**
* @dataProvider the_content_provider * @dataProvider the_content_provider
*/ */
@ -10,10 +14,13 @@ class Test_Activitypub_Hashtag extends WP_UnitTestCase {
} }
public function the_content_provider() { public function the_content_provider() {
$object_link = get_tag_link( 'object' );
return [ return [
[ 'test', 'test' ], [ 'test', 'test' ],
[ '#test', '#test' ], [ '#test', '#test' ],
[ 'hallo #test test', 'hallo #test test' ], [ 'hallo #test test', 'hallo #test test' ],
[ 'hallo #object test', 'hallo <a rel="tag" class="u-tag u-category" href="' . $object_link . '">#object</a> test' ],
]; ];
} }
} }