finally fixed test

This commit is contained in:
Matthias Pfefferle 2019-08-18 22:53:01 +02:00
parent a0d670ed77
commit c53f840230
2 changed files with 8 additions and 4 deletions

View file

@ -18,5 +18,12 @@
], ],
"extra": { "extra": {
"installer-name": "activitypub" "installer-name": "activitypub"
},
"scripts": {
"test": [
"composer install",
"bin/install-wp-tests.sh wordpress wordpress wordpress",
"vendor/bin/phpunit"
]
} }
} }

View file

@ -1,9 +1,5 @@
<?php <?php
class Test_Activitypub_Hashtag extends WP_UnitTestCase { class Test_Activitypub_Hashtag extends WP_UnitTestCase {
public function setUp() {
wp_create_tag( 'object' );
}
/** /**
* @dataProvider the_content_provider * @dataProvider the_content_provider
*/ */
@ -14,6 +10,7 @@ class Test_Activitypub_Hashtag extends WP_UnitTestCase {
} }
public function the_content_provider() { public function the_content_provider() {
wp_create_term( 'object', 'post_tag' );
$object = get_term_by( 'name', 'object', 'post_tag' ); $object = get_term_by( 'name', 'object', 'post_tag' );
$link = get_term_link( $object, 'post_tag' ); $link = get_term_link( $object, 'post_tag' );