test object links
This commit is contained in:
parent
bdd9bd8775
commit
c9c05e263f
1 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
class Test_Activitypub_Hashtag extends WP_UnitTestCase {
|
||||
protected function setUp() {
|
||||
wp_create_tag( 'object' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider the_content_provider
|
||||
*/
|
||||
|
@ -10,10 +14,13 @@ class Test_Activitypub_Hashtag extends WP_UnitTestCase {
|
|||
}
|
||||
|
||||
public function the_content_provider() {
|
||||
$object_link = get_tag_link( 'object' );
|
||||
|
||||
return [
|
||||
[ 'test', 'test' ],
|
||||
[ '#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' ],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue