diff --git a/tests/phpunit/tests/admin/Admin_WpCommentsListTable_BulkActions_Test.php b/tests/phpunit/tests/admin/Admin_WpCommentsListTable_BulkActions_Test.php
new file mode 100644
index 0000000000000..54cab8068a1ca
--- /dev/null
+++ b/tests/phpunit/tests/admin/Admin_WpCommentsListTable_BulkActions_Test.php
@@ -0,0 +1,52 @@
+table = _get_list_table( 'WP_Comments_List_Table', array( 'screen' => 'edit-comments' ) );
+ }
+
+ /**
+ * @ticket 19278
+ */
+ public function test_bulk_action_menu_supports_options_and_optgroups() {
+ add_filter(
+ 'bulk_actions-edit-comments',
+ static function () {
+ return array(
+ 'delete' => 'Delete',
+ 'Change State' => array(
+ 'feature' => 'Featured',
+ 'sale' => 'On Sale',
+ ),
+ );
+ }
+ );
+
+ ob_start();
+ $this->table->bulk_actions();
+ $output = ob_get_clean();
+
+ $expected = <<<'OPTIONS'
+
+
+OPTIONS;
+ $expected = str_replace( "\r\n", "\n", $expected );
+
+ $this->assertStringContainsString( $expected, $output );
+ }
+}
diff --git a/tests/phpunit/tests/admin/Admin_WpCommentsListTable_ExtraTablenav_Test.php b/tests/phpunit/tests/admin/Admin_WpCommentsListTable_ExtraTablenav_Test.php
new file mode 100644
index 0000000000000..00265ed8f4fcc
--- /dev/null
+++ b/tests/phpunit/tests/admin/Admin_WpCommentsListTable_ExtraTablenav_Test.php
@@ -0,0 +1,84 @@
+table = _get_list_table( 'WP_Comments_List_Table', array( 'screen' => 'edit-comments' ) );
+ }
+
+ /**
+ * @ticket 40188
+ */
+ public function test_filter_button_should_not_be_shown_if_there_are_no_comments() {
+ ob_start();
+ $this->table->extra_tablenav( 'top' );
+ $output = ob_get_clean();
+
+ $this->assertStringNotContainsString( 'id="post-query-submit"', $output );
+ }
+
+ /**
+ * @ticket 40188
+ */
+ public function test_filter_button_should_be_shown_if_there_are_comments() {
+ $post_id = self::factory()->post->create();
+ $comment_id = self::factory()->comment->create(
+ array(
+ 'comment_post_ID' => $post_id,
+ 'comment_approved' => '1',
+ )
+ );
+
+ $this->table->prepare_items();
+
+ ob_start();
+ $this->table->extra_tablenav( 'top' );
+ $output = ob_get_clean();
+
+ $this->assertStringContainsString( 'id="post-query-submit"', $output );
+ }
+
+ /**
+ * @ticket 40188
+ */
+ public function test_filter_comment_type_dropdown_should_be_shown_if_there_are_comments() {
+ $post_id = self::factory()->post->create();
+ $comment_id = self::factory()->comment->create(
+ array(
+ 'comment_post_ID' => $post_id,
+ 'comment_approved' => '1',
+ )
+ );
+
+ $this->table->prepare_items();
+
+ ob_start();
+ $this->table->extra_tablenav( 'top' );
+ $output = ob_get_clean();
+
+ $this->assertStringContainsString( 'id="filter-by-comment-type"', $output );
+ $this->assertStringContainsString( "