be sure to register hooks
This commit is contained in:
parent
b984319f8f
commit
4b97d412e0
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
class Test_Activitypub_Post extends WP_UnitTestCase {
|
class Test_Activitypub_Post extends WP_UnitTestCase {
|
||||||
public function test_to_array() {
|
public function test_to_array() {
|
||||||
|
\Activitypub\Activitypub::init();
|
||||||
|
|
||||||
$post = \wp_insert_post(
|
$post = \wp_insert_post(
|
||||||
array(
|
array(
|
||||||
'post_author' => 1,
|
'post_author' => 1,
|
||||||
|
@ -16,8 +18,6 @@ class Test_Activitypub_Post extends WP_UnitTestCase {
|
||||||
|
|
||||||
\wp_trash_post( $post );
|
\wp_trash_post( $post );
|
||||||
|
|
||||||
\sleep( 3 );
|
|
||||||
|
|
||||||
$activitypub_post = new \Activitypub\Model\Post( $post );
|
$activitypub_post = new \Activitypub\Model\Post( $post );
|
||||||
|
|
||||||
$this->assertEquals( $permalink, $activitypub_post->get_id() );
|
$this->assertEquals( $permalink, $activitypub_post->get_id() );
|
||||||
|
|
Loading…
Reference in a new issue