From 6083ab6a71c9ab03bcb849a8d962426f0036b41d Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Mon, 28 May 2012 20:41:15 +0900
Subject: [PATCH] Issue #1591440 by aspilicious: Convert help tests to PSR-0.

---
 core/modules/help/help.info                   |  1 -
 .../Drupal/help/Tests/HelpTest.php}           | 40 ++---------------
 .../help/lib/Drupal/help/Tests/NoHelpTest.php | 44 +++++++++++++++++++
 3 files changed, 48 insertions(+), 37 deletions(-)
 rename core/modules/help/{help.test => lib/Drupal/help/Tests/HelpTest.php} (77%)
 create mode 100644 core/modules/help/lib/Drupal/help/Tests/NoHelpTest.php

diff --git a/core/modules/help/help.info b/core/modules/help/help.info
index b01a8ae06e87..615a302ba9c5 100644
--- a/core/modules/help/help.info
+++ b/core/modules/help/help.info
@@ -3,4 +3,3 @@ description = Manages the display of online help.
 package = Core
 version = VERSION
 core = 8.x
-files[] = help.test
diff --git a/core/modules/help/help.test b/core/modules/help/lib/Drupal/help/Tests/HelpTest.php
similarity index 77%
rename from core/modules/help/help.test
rename to core/modules/help/lib/Drupal/help/Tests/HelpTest.php
index 26214314c658..46c5688657bf 100644
--- a/core/modules/help/help.test
+++ b/core/modules/help/lib/Drupal/help/Tests/HelpTest.php
@@ -2,15 +2,17 @@
 
 /**
  * @file
- * Tests for help.module.
+ * Definition of Drupal\help\Tests\HelpTest.
  */
 
+namespace Drupal\help\Tests;
+
 use Drupal\simpletest\WebTestBase;
 
 /**
  * Tests help display and user access for all modules implementing help.
  */
-class HelpTestCase extends WebTestBase {
+class HelpTest extends WebTestBase {
   // Tests help implementations of many arbitrary core modules.
   protected $profile = 'standard';
 
@@ -106,37 +108,3 @@ protected function getModuleList() {
     }
   }
 }
-
-/**
- * Tests a module without help to verify it is not listed in the help page.
- */
-class NoHelpTestCase extends WebTestBase {
-  /**
-   * The user who will be created.
-   */
-  protected $big_user;
-
-  public static function getInfo() {
-    return array(
-      'name' => 'No help',
-      'description' => 'Verify no help is displayed for modules not providing any help.',
-      'group' => 'Help',
-    );
-  }
-
-  function setUp() {
-    // Use one of the test modules that do not implement hook_help().
-    parent::setUp('menu_test');
-    $this->big_user = $this->drupalCreateUser(array('access administration pages'));
-  }
-
-  /**
-   * Ensures modules not implementing help do not appear on admin/help.
-   */
-  function testMainPageNoHelp() {
-    $this->drupalLogin($this->big_user);
-
-    $this->drupalGet('admin/help');
-    $this->assertNoText('Hook menu tests', t('Making sure the test module menu_test does not display a help link in admin/help'));
-  }
-}
diff --git a/core/modules/help/lib/Drupal/help/Tests/NoHelpTest.php b/core/modules/help/lib/Drupal/help/Tests/NoHelpTest.php
new file mode 100644
index 000000000000..852ed056b1d7
--- /dev/null
+++ b/core/modules/help/lib/Drupal/help/Tests/NoHelpTest.php
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\help\Tests\NoHelpTest.
+ */
+
+namespace Drupal\help\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests a module without help to verify it is not listed in the help page.
+ */
+class NoHelpTest extends WebTestBase {
+  /**
+   * The user who will be created.
+   */
+  protected $big_user;
+
+  public static function getInfo() {
+    return array(
+      'name' => 'No help',
+      'description' => 'Verify no help is displayed for modules not providing any help.',
+      'group' => 'Help',
+    );
+  }
+
+  function setUp() {
+    // Use one of the test modules that do not implement hook_help().
+    parent::setUp('menu_test');
+    $this->big_user = $this->drupalCreateUser(array('access administration pages'));
+  }
+
+  /**
+   * Ensures modules not implementing help do not appear on admin/help.
+   */
+  function testMainPageNoHelp() {
+    $this->drupalLogin($this->big_user);
+
+    $this->drupalGet('admin/help');
+    $this->assertNoText('Hook menu tests', t('Making sure the test module menu_test does not display a help link in admin/help'));
+  }
+}
-- 
GitLab