add hooks to the test

This commit is contained in:
Matthias Pfefferle 2022-12-27 16:16:22 +01:00
parent 4b97d412e0
commit eea3f582d6

View file

@ -1,7 +1,8 @@
<?php
class Test_Activitypub_Post extends WP_UnitTestCase {
public function test_to_array() {
\Activitypub\Activitypub::init();
\add_action( 'wp_trash_post', array( '\Activitypub\Activitypub', 'trash_post' ), 1 );
\add_action( 'untrash_post', array( '\Activitypub\Activitypub', 'untrash_post' ), 1 );
$post = \wp_insert_post(
array(