Skip to content
Snippets Groups Projects
Commit 6083ab6a authored by catch's avatar catch
Browse files

Issue #1591440 by aspilicious: Convert help tests to PSR-0.

parent 18f12d90
No related branches found
No related tags found
No related merge requests found
......@@ -3,4 +3,3 @@ description = Manages the display of online help.
package = Core
version = VERSION
core = 8.x
files[] = help.test
......@@ -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'));
}
}
<?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'));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment