2019-08-18 22:08:58 +02:00
|
|
|
<?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' ],
|
2019-08-18 22:16:59 +02:00
|
|
|
[ 'hallo #test test', 'hallo #test test' ],
|
2019-08-18 22:08:58 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|