• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / a8a215def53aa38d83991bd5baaddd3337e43c4b

07 Nov 2025 10:08AM UTC coverage: 49.286%. First build
a8a215def53aa38d83991bd5baaddd3337e43c4b

Pull #22691

github

web-flow
Merge aeebaf311 into b63825c5c
Pull Request #22691: Initialize the backend work needed for the tasklist.

7 of 184 new or added lines in 13 files covered. (3.8%)

17497 of 35501 relevant lines covered (49.29%)

3.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/task-list/application/tasks/delete-hello-world.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
namespace Yoast\WP\SEO\Task_List\Application\Tasks;
4

5
use WP_Post;
6
use Yoast\WP\SEO\Task_List\Domain\Abstract_Completeable_Task;
7

8
/**
9
 * Represents the task for deleting the Hello World post.
10
 */
11
class Delete_Hello_World extends Abstract_Completeable_Task {
12

13
        /**
14
         * Holds the id.
15
         *
16
         * @var string
17
         */
18
        protected $id = 'delete-hello-world';
19

20
        /**
21
         * Holds the priority.
22
         *
23
         * @var string
24
         */
25
        protected $priority = 'normal';
26

27
        /**
28
         * Holds the duration.
29
         *
30
         * @var int
31
         */
32
        protected $duration = 1;
33

34
        /**
35
         * Returns whether this task is completed.
36
         *
37
         * @return bool Whether this task is completed.
38
         */
NEW
39
        public function get_is_completed(): bool {
×
NEW
40
                $post = \get_post( 1 );
×
NEW
41
                if ( $post instanceof WP_Post === false || $post->post_status !== 'publish' ) {
×
NEW
42
                        return true;
×
43
                }
44

NEW
45
                return $post->post_date !== $post->post_modified;
×
46
        }
47

48
        /**
49
         * Returns the task's link.
50
         *
51
         * @return string|null
52
         */
NEW
53
        public function get_link(): ?string {
×
NEW
54
                return null;
×
55
        }
56

57
        /**
58
         * Completes a task.
59
         *
60
         * @return void
61
         */
NEW
62
        public function complete_task(): void {
×
63
                // @TODO: Add some error handling here.
NEW
64
                $post = \get_post( 1 );
×
NEW
65
                if ( $post instanceof WP_Post ) {
×
NEW
66
                        \wp_delete_post( $post->ID, true );
×
67
                }
68
        }
69
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc