diff --git a/tests/test-automatically-paginate-posts.php b/tests/test-automatically-paginate-posts.php
index 59aceff37fe61cc2a68d5d9d8a25ba874e1227a1..3881e9a54d4c979a5291b2bd0ac75726d69f1565 100755
--- a/tests/test-automatically-paginate-posts.php
+++ b/tests/test-automatically-paginate-posts.php
@@ -378,9 +378,11 @@ class Test_Automatically_Paginate_Posts extends WP_UnitTestCase {
 /**
  * Test class for admin-related restrictions.
  *
- * phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound
+ * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound
  */
 class Test_Autopaging_Admin {
+	// phpcs:enable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound
+
 	/**
 	 * Mock being in wp-admin.
 	 *