added test
This commit is contained in:
parent
da155405ee
commit
8e87800ee0
1 changed files with 18 additions and 0 deletions
18
tests/test-class-activitypub-hashtag.php
Normal file
18
tests/test-class-activitypub-hashtag.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
class Test_Activitypub_Hashtag extends WP_UnitTestCase {
|
||||
/**
|
||||
* @dataProvider the_content_provider
|
||||
*/
|
||||
public function test_the_content( $content, $content_with_hashtag ) {
|
||||
$content = \Activitypub\Hashtag::the_content( $content );
|
||||
|
||||
$this->assertEquals( $content_with_hashtag, $content );
|
||||
}
|
||||
|
||||
public function the_content_provider() {
|
||||
return [
|
||||
[ 'test', 'test' ],
|
||||
[ '#test', '#test' ],
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue