diff --git a/config_entity_example/tests/src/Functional/ConfigEntityExampleTest.php b/config_entity_example/tests/src/Functional/ConfigEntityExampleTest.php index c3aedb7..4e48f14 100644 --- a/config_entity_example/tests/src/Functional/ConfigEntityExampleTest.php +++ b/config_entity_example/tests/src/Functional/ConfigEntityExampleTest.php @@ -36,14 +36,14 @@ class ConfigEntityExampleTest extends BrowserTestBase { */ public static function getInfo() { return array( - 'name' => 'Config Entity Example functional test', + 'name' => 'Config Entity Example Functional test', 'description' => 'Test the Config Entity Example module.', 'group' => 'Examples', ); } /** - * Various functional test of the Config Entity Example module. + * Various Functional test of the Config Entity Example module. * * 1) Verify that the Marvin entity was created when the module was installed. * diff --git a/menu_example/menu_example.links.menu.yml b/menu_example/menu_example.links.menu.yml index a214cfc..dbebb0c 100644 --- a/menu_example/menu_example.links.menu.yml +++ b/menu_example/menu_example.links.menu.yml @@ -34,10 +34,10 @@ examples.menu_example.custom_access_page: parent: examples.menu_example.custom_access route_name: examples.menu_example.custom_access_page -examples.menu_example.path_only: +examples.menu_example.route_only: title: Route only example parent: examples.menu_example - route_name: examples.menu_example.path_only + route_name: examples.menu_example.route_only weight: 20 examples.menu_example.tabs: @@ -67,10 +67,3 @@ examples.menu_example.placeholder_argument: parent: examples.menu_example route_name: examples.menu_example.placeholder_argument weight: 60 - -example.menu_example.default_arg.arg_optional: - title: Processed placeholder Arguments - description: '' - parent: examples.menu_example - route_name: examples.menu_example.default_arg.arg_optional - weight: 60 diff --git a/menu_example/menu_example.routing.yml b/menu_example/menu_example.routing.yml index f5afe89..a152b6f 100644 --- a/menu_example/menu_example.routing.yml +++ b/menu_example/menu_example.routing.yml @@ -18,7 +18,7 @@ examples.menu_example.permissioned: path: '/examples/menu-example/permissioned' defaults: _controller: '\Drupal\menu_example\Controller\MenuExampleController::permissioned' - _title: 'Permissioned Example' + _title: 'Permissioned Route Example' requirements: _access: 'TRUE' @@ -26,7 +26,7 @@ examples.menu_example.permissioned_controlled: path: '/examples/menu-example/permissioned/controlled' defaults: _controller: '\Drupal\menu_example\Controller\MenuExampleController::permissionedControlled' - _title: 'Permissioned Menu Item' + _title: 'Permissioned Route' requirements: _permission: 'access protected menu example' @@ -44,20 +44,20 @@ examples.menu_example.custom_access_page: _controller: '\Drupal\menu_example\Controller\MenuExampleController::customAccessPage' _title: 'Custom Access Menu Item' requirements: - _custom_access: '\Drupal\menu_example\Controller\MenuExampleController::getRole' + _menu_example_role: 'TRUE' -examples.menu_example.path_only: - path: '/examples/menu-example/path-only' +examples.menu_example.route_only: + path: '/examples/menu-example/route-only' defaults: - _controller: '\Drupal\menu_example\Controller\MenuExampleController::pathOnly' - _title: 'Menu_Callback example' + _controller: '\Drupal\menu_example\Controller\MenuExampleController::routeOnly' + _title: 'Route only example' requirements: _access: 'TRUE' examples.menu_example.callback: - path: '/examples/menu-example/path-only/callback' + path: '/examples/menu-example/route-only/callback' defaults: - _controller: '\Drupal\menu_example\Controller\MenuExampleController::pathOnlycallback' + _controller: '\Drupal\menu_example\Controller\MenuExampleController::routeOnlyCallback' _title: 'Callback only' requirements: _access: 'TRUE' @@ -97,7 +97,7 @@ examples.menu_example.tabnameFour: path: 'examples/menu-example/tabs/forth' defaults: _title: 'Tabs' - _controller: '\Drupal\menu_example\Controller\MenuExampleController::tabNameForth' + _controller: '\Drupal\menu_example\Controller\MenuExampleController::tabNameFourth' requirements: _access: 'TRUE' @@ -118,26 +118,12 @@ examples.menu_example.defaultThird: _access: 'TRUE' examples.menu_example.use_url_arguments: - path: 'examples/menu-example/use-url-arguments' - defaults: - _title: 'Extra Agruments' - _controller: '\Drupal\menu_example\Controller\MenuExampleController::urlArgument' - requirements: - _access: 'TRUE' - -examples.menu_example.use_url_arguments1: - path: 'examples/menu-example/use-url-arguments/{arg1}' - defaults: - _title: 'Extra Agruments' - _controller: '\Drupal\menu_example\Controller\MenuExampleController::urlArgument1' - requirements: - _access: 'TRUE' - -examples.menu_example.use_url_arguments2: path: 'examples/menu-example/use-url-arguments/{arg1}/{arg2}' defaults: - _title: 'Extra Agruments' - _controller: '\Drupal\menu_example\Controller\MenuExampleController::urlArgument2' + _title: 'URL Arguments' + _controller: '\Drupal\menu_example\Controller\MenuExampleController::urlArgument' + arg1: '' + arg2: '' requirements: _access: 'TRUE' @@ -153,31 +139,23 @@ examples.menu_example.placeholder_argument: path: 'examples/menu-example/placeholder-argument' defaults: _title: 'Placeholder Arguments' - _controller: '\Drupal\menu_example\Controller\MenuExampleController::argument' + _controller: '\Drupal\menu_example\Controller\MenuExampleController::placeholderArgs' requirements: _access: 'TRUE' examples.menu_example.placeholder_argument.display: - path: 'examples/menu-example/placeholder-argument/{node}/display' + path: 'examples/menu-example/placeholder-argument/{arg}/display' defaults: _title: 'Placeholder Arguments' - _controller: '\Drupal\menu_example\Controller\MenuExampleController::display' + _controller: '\Drupal\menu_example\Controller\MenuExampleController::placeholderArgsDisplay' + arg: '' requirements: _access: 'TRUE' -examples.menu_example.default_arg.arg_optional: - path: 'examples/menu-example/default_arg/{no}' - defaults: - _title: 'Processed Placeholder Arguments' - _controller: '\Drupal\menu_example\Controller\MenuExampleController::argOptional' - no: 99 - requirements: - _access: 'TRUE' - -example.menu_example.menu_original_path: - path: 'examples/menu-example/menu_original_path' +example.menu_example.path_override: + path: 'examples/menu-example/menu-original-path' defaults: - _title: 'Menu path that will be altered by hook_menu_alter()' - _controller: '\Drupal\menu_example\Controller\MenuExampleController::orginalPath' + _title: 'Menu path that will be altered' + _controller: '\Drupal\menu_example\Controller\MenuExampleController::pathOverride' requirements: _access: 'TRUE' diff --git a/menu_example/menu_examples.services.yml b/menu_example/menu_examples.services.yml index e69de29..b62e673 100644 --- a/menu_example/menu_examples.services.yml +++ b/menu_example/menu_examples.services.yml @@ -0,0 +1,10 @@ +services: + menu_example.access_check.role: + class: Drupal\menu_example\Access\RoleAccessCheck + tags: + - { name: access_check, applies_to: _menu_example_role } + + menu_example.route_subscriber: + class: Drupal\menu_example\Routing\RouteSubscriber + tags: + - { name: event_subscriber } diff --git a/menu_example/src/Access/RoleAccessCheck.php b/menu_example/src/Access/RoleAccessCheck.php index e69de29..aae54b8 100644 --- a/menu_example/src/Access/RoleAccessCheck.php +++ b/menu_example/src/Access/RoleAccessCheck.php @@ -0,0 +1,27 @@ +isAuthenticated()); + } + +} diff --git a/menu_example/src/Controller/MenuExampleController.php b/menu_example/src/Controller/MenuExampleController.php index 125c819..0e9b3d3 100644 --- a/menu_example/src/Controller/MenuExampleController.php +++ b/menu_example/src/Controller/MenuExampleController.php @@ -5,34 +5,37 @@ namespace Drupal\menu_example\Controller; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Link; use Drupal\Core\Url; -use Drupal\Core\Access\AccessResult; -use Drupal\Core\Session\AccountInterface; use Drupal\examples\Utility\DescriptionTemplateTrait; /** * Controller routines for menu example routes. */ class MenuExampleController extends ControllerBase { + use DescriptionTemplateTrait; + + /** + * {@inheritdoc} + */ + protected function getModuleName() { + return 'menu_example'; + } /** * Page callback for the simplest introduction menu entry. - * The router _controller callback, maps the path - * 'examples/menu-example' to this method. + * + * The controller callback defined menu_examples.routing.yml file, + * maps the path 'examples/menu-example' to this method. + * + * @throws \InvalidArgumentException */ public function basicInstructions() { - $url = Url::fromUri('internal:/examples/menu-example/path-only'); - $link = Link::fromTextAndUrl($this->t('visit a similar page with no menu link'), $url)->toString(); return [ - '#markup' => $this->t('This page is displayed by the simplest (and base) - menu example. Note that the title of the page is the same as the link - title. You can also @link. There are a number of - examples here, from the most basic (like this one) to extravagant - mappings of loaded placeholder arguments. Enjoy!', ['@link' => $link]), + $this->description(), ]; } /** - *Show a menu link in a menu other than the default "Navigation" menu. + * Show a menu link in a menu other than the default "Navigation" menu. */ public function alternateMenu() { return [ @@ -42,7 +45,9 @@ class MenuExampleController extends ControllerBase { } /** - *A menu entry with simple permissions using 'access protected menu example'. + * A menu entry with simple permissions using 'access protected menu example'. + * + * @throws \InvalidArgumentException */ public function permissioned() { $url = Url::fromUri('internal:/examples/menu-example/permissioned/controlled'); @@ -53,17 +58,20 @@ class MenuExampleController extends ControllerBase { } /** - *Now the actual permissioned menu item. - *For the permissioned menu we have defined it under menu_example/menu_example.routing.yml + * Only accessible when the user will be granted with required permission. + * + * The permission is defined in file menu_examples.permissions.yml. */ public function permissionedControlled() { return [ - '#markup' => $this->t('This menu entry will not show and the page will not be accessible without the "access protected menu example" permission.'), + '#markup' => $this->t('This menu entry will not show and the page will not be accessible without the "access protected menu example" permission to current user.'), ]; } /** + * Demonstrates the use of custom access check in routes. * + * @throws \InvalidArgumentException */ public function customAccess() { $url = Url::fromUri('internal:/examples/menu-example/custom-access-page'); @@ -74,18 +82,41 @@ class MenuExampleController extends ControllerBase { } /** - * + * Content will be displayed only if access check is satisfied. */ - public function pathonly() { - $url = Url::fromUri('internal:/examples/menu-example/path-only/callback'); - $link = Link::fromTextAndUrl($this->t('examples/menu-example/path-only/callback'), $url)->toString(); + public function customAccessPage() { return [ - '#markup' => $this->t('A menu entry with no menu link (MENU_CALLBACK) is at @link', ['@link' => $link]), + '#markup' => $this->t('This menu entry will not be visible and access will result + in a 403 error unless the user has the "authenticated" role. This is + accomplished with a custom access check plugin.'), ]; } /** + * Only callback without a menu link. * + * @throws \InvalidArgumentException + */ + public function routeOnly() { + $url = Url::fromUri('internal:/examples/menu-example/route-only/callback'); + $link = Link::fromTextAndUrl($this->t('examples/menu-example/route-only/callback'), $url)->toString(); + return [ + '#markup' => $this->t('A menu entry with no menu link is at @link', ['@link' => $link]), + ]; + } + + /** + * Such callbacks can be user for creating web services in Drupal 8. + */ + public function routeOnlyCallback() { + return [ + '#markup' => $this->t('The route entry has no corresponding menu links entry, so it provides a route without a menu link, but it is the same in every other way to the simplest example.'), + ]; + } + + + /** + * A simple menu entry to display tabs. */ public function tabs() { return [ @@ -94,7 +125,7 @@ class MenuExampleController extends ControllerBase { } /** - * + * Callback for returning second tab. */ public function tabNameSecond() { return [ @@ -103,7 +134,7 @@ class MenuExampleController extends ControllerBase { } /** - * + * Callback for returning third tab. */ public function tabNameThird() { return [ @@ -112,16 +143,16 @@ class MenuExampleController extends ControllerBase { } /** - * + * Callback for returning fourth tab. */ - public function tabNameForth() { + public function tabNameFourth() { return [ - '#markup' => $this->t('This is the tab "Forth" in the "basic tabs" example'), + '#markup' => $this->t('This is the tab "Fourth" in the "basic tabs" example'), ]; } /** - * + * Callback for second secondary tab. */ public function defaultSecond() { return [ @@ -130,7 +161,7 @@ class MenuExampleController extends ControllerBase { } /** - * + * Callback for third secondary tab. */ public function defaultThird() { return [ @@ -139,61 +170,59 @@ class MenuExampleController extends ControllerBase { } /** + * Demonstrates use of url arguments in for menu item. * + * @throws \InvalidArgumentException */ - public function urlArgument() { - $url = Url::fromUri('internal:/examples/menu-example/use-url-arguments/firstarg/secondarg'); - $link = Link::fromTextAndUrl($this->t('examples/menu-example/use-url-arguments/firstarg/secondarg'), $url)->toString(); + public function urlArgument($arg1, $arg2) { + // Perpare link for single arguments. + $url = Url::fromUri('internal:/examples/menu-example/use-url-arguments/one'); + $link = Link::fromTextAndUrl($this->t('examples/menu-example/use-url-arguments/one'), $url)->toString(); + + // Prepare link for multiple arguments. $urltwo = Url::fromUri('internal:/examples/menu-example/use-url-arguments/one/two'); $linktwo = Link::fromTextAndUrl($this->t('examples/menu-example/use-url-arguments/one/two'), $urltwo)->toString(); - return [ - '#markup' => $this->t('This page demonstrates using arguments in the path (portions of the path after "menu_example/use-url-arguments". For example, access it with @link or @linktwo', ['@link' => $link, '@linktwo' => $linktwo]), - ]; - } + $markup = $this->t('This page demonstrates using arguments in the url. For example, access it with @link for single argument or @linktwo for two arguments in URL', ['@link' => $link, '@linktwo' => $linktwo]); - /** - * - */ - public function urlArgument1($arg1 = '') { - return [ - '#markup' => $this->t('Argument1 = @arg1', ['@arg1' => $arg1]), - ]; - } + if (!empty($arg1)) { + $markup .= '
' . $this->t('Argument 1 = @arg', array('@arg' => $arg1)) . '
'; + } + if (!empty($arg2)) { + $markup .= '
' . $this->t('Argument 2 = @arg', array('@arg' => $arg2)) . '
'; + } - /** - * - */ - public function urlArgument2($arg1, $arg2) { return [ - '#markup' => $this->t('Argument1 = @arg1 , Argument2 = @arg2', ['@arg1' => $arg1, '@arg2' => $arg2]), + '#markup' => $markup, + ]; } /** - * + * Demonstrate generation of dynamic creation of page title. */ public function titleCallback() { return [ - '#markup' => $this->t('The title of this page is dynamically changed by the title callback for this route.'), + '#markup' => $this->t('The title of this page is dynamically changed by the title callback for this route. Also, the title of the menu link is dynamically changed by implementing hook_menu_link_presave() and hook_translated_menu_link_alter().'), ]; } /** - * + * Generates title dynamically. */ - public function backTitle($title = '') { + public function backTitle() { $user = \Drupal::currentUser(); - $title = $user->getDisplayName(); return [ - '#markup' => $this->t('Dynamic Title: username = @title', ['@title' => $title]), + $title = $user->getDisplayName(), ]; } /** + * Demonstrates how you can provide a placeholder url arguments. * + * @throws \InvalidArgumentException */ - public function argument() { + public function placeholderArgs() { $url = Url::fromUri('internal:/examples/menu-example/placeholder-argument/3343/display'); $link = Link::fromTextAndUrl($this->t('examples/menu-example/placeholder-argument/3343/display'), $url)->toString(); return [ @@ -202,77 +231,28 @@ class MenuExampleController extends ControllerBase { } /** + * Displays placeholder argument supplied in URL. * - */ - public function display($node = '') { - return [ - '#markup' => $node, - ]; - - } - - /** - * - */ - public function orginalPath() { - return [ - '#markup' => $this->t('This menu item was created strictly to allow the hook_menu_alter() function to have something to operate on.hook_menu defined the path as examples/menu_example/menu_original_path. The hook_menu_alter() changes it to examples/menu_example/menu_altered_path. You can try navigating to both paths and see what happens!'), - ]; - } - - /** + * @param string $arg + * URL argument. * + * @return array + * URL argument. */ - public function pathOnlycallback() { + public function placeholderArgsDisplay($arg) { return [ - '#markup' => $this->t('The menu entry for this page is of type MENU_CALLBACK, so it provides only a path but not a link in the menu links, but it is the same in every other way to the simplest example.'), - ]; - } - - /** - * - */ - public function argOptional($no = '') { - $mapped_value = NULL; - static $mappings = [ - 1 => 'one', - 2 => 'two', - 3 => 'three', - 99 => 'jackpot! default', + '#markup' => $arg, ]; - if (isset($mappings[$no])) { - $mapped_value = $mappings[$no]; - } - if (!empty($mapped_value)) { - return [ - '#markup' => $this->t('Loaded value was @loaded', ['@loaded' => $mapped_value]), - ]; - } - else { - return [ - '#markup' => $this->t('Sorry, the id @id was not found to be loaded', ['@id' => $no]), - ]; - } } /** - *We will define our own "access callback" function. + * Demonstrate how one can alter the existing routes. */ - public function customAccessPage() { + public function pathOverride() { return [ - '#markup' => $this->t('This menu entry will not be visible and access will result - in a 403 error unless the user has the "authenticated" role. This is - accomplished with a custom access callback.'), + '#markup' => $this->t('This menu item was created strictly to allow the RouteSubscriber class to have something to operate on. menu_example.routing.yml defined the path as examples/menu_example/menu_original_path. The alterRoutes() changes it to examples/menu_example/menu_altered_path. You can try navigating to both paths and see what happens!'), ]; } - /** - * - */ - public function getRole(AccountInterface $account) { - - return AccessResult::allowedIf($account->hasPermission('authenticated')); - } - } diff --git a/menu_example/src/Routing/RouteSubscriber.php b/menu_example/src/Routing/RouteSubscriber.php index e69de29..a0b39ff 100644 --- a/menu_example/src/Routing/RouteSubscriber.php +++ b/menu_example/src/Routing/RouteSubscriber.php @@ -0,0 +1,25 @@ +get('example.menu_example.menu_original_path'); + // Set the new path. + $route->setPath('/examples/menu-example/menu-altered-path'); + // Change title to indicate changes. + $route->setDefault('_title', 'Menu item altered by RouteSubscriber::alterRoutes'); + + } + +} diff --git a/menu_example/templates/description.html.twig b/menu_example/templates/description.html.twig index e69de29..a7cd0ec 100644 --- a/menu_example/templates/description.html.twig +++ b/menu_example/templates/description.html.twig @@ -0,0 +1,14 @@ +{# + +Description text for the Block Example. + +#} + +{% set link = path('examples.menu_example.route_only') %} + +{% trans %} + +

This page is displayed by the simplest (and base) menu example. Note that the title of the page is the same as the link title. You can also visit a similar page with no menu link. +There are a number of examples here, from the most basic (like this one) to extravagant mappings of loaded placeholder arguments. Enjoy!

+ +{% endtrans %} diff --git a/menu_example/tests/src/Functional/MenuExampleTest.php b/menu_example/tests/src/Functional/MenuExampleTest.php index b9686a1..0d46995 100644 --- a/menu_example/tests/src/Functional/MenuExampleTest.php +++ b/menu_example/tests/src/Functional/MenuExampleTest.php @@ -1,31 +1,34 @@ drupalGet(''); @@ -35,37 +38,34 @@ class MenuExampleTest extends BrowserTestBase { $this->clickLink(t('Custom Access Example')); $this->assertText(t('Custom Access Example')); - $this->drupalGet('examples/menu_example/permissioned'); + $this->drupalGet('examples/menu-example/permissioned'); $this->assertText(t('Permissioned Example')); - $this->clickLink('examples/menu_example/permissioned/controlled'); + $this->clickLink('examples/menu-example/permissioned/controlled'); $this->assertResponse(403); - $this->drupalGet('examples/menu_example'); + $this->drupalGet('examples/menu-example'); - $this->clickLink(t('MENU_CALLBACK example')); + $this->clickLink(t('Route only example')); $this->clickLink(t('Tabs')); $this->assertText(t('This is the "tabs" menu entry')); - $this->drupalGet('examples/menu_example/tabs/second'); + $this->drupalGet('examples/menu-example/tabs/second'); $this->assertText(t('This is the tab "second" in the "basic tabs" example')); $this->clickLink(t('third')); $this->assertText(t('This is the tab "third" in the "basic tabs" example')); - $this->clickLink(t('Extra Arguments')); + $this->clickLink(t('URL Arguments')); - $this->drupalGet('examples/menu_example/use-url-arguments/one/two'); - $this->assertText(t('Argument 1=one Argument 2=two')); + $this->drupalGet('examples/menu-example/use-url-arguments/one/two'); + $this->assertText(t('Argument 1 = one Argument 2 = two')); $this->clickLink(t('Placeholder Arguments')); - $this->clickLink(t('examples/menu_example/placeholder-argument/3343/display')); - $this->assertRaw('
3343
'); - - $this->clickLink(t('Processed Placeholder Arguments')); - $this->assertText(t('Loaded value was jackpot! default')); + $this->clickLink(t('examples/menu-example/placeholder-argument/3343/display')); + $this->assertText('3343'); // Create a user with permissions to access protected menu entry. $web_user = $this->drupalCreateUser(array('access protected menu example')); @@ -76,24 +76,24 @@ class MenuExampleTest extends BrowserTestBase { // Check that our title callback changing /user dynamically is working. // Using ' because of the format_username function. - $this->assertRaw(t("@name's account", array('@name' => $web_user->getUsername())), format_string('Title successfully changed to account name: %name.', array('%name' => $web_user->getUsername()))); + $this->assertText(t("@name's account", array('@name' => $web_user->getUsername())), format_string('Title successfully changed to account name: %name.', array('%name' => $web_user->getUsername()))); // Now start testing other menu entries. - $this->drupalGet('examples/menu_example'); + $this->drupalGet('examples/menu-example'); $this->clickLink(t('Custom Access Example')); $this->assertText(t('Custom Access Example')); - $this->drupalGet('examples/menu_example/custom-access/page'); - $this->assertResponse(200); + $this->drupalGet('examples/menu-example/custom-access/page'); + $this->assertResponse(200); - $this->drupalGet('examples/menu_example/permissioned'); + $this->drupalGet('examples/menu-example/permissioned'); $this->assertText('Permissioned Example'); - $this->clickLink('examples/menu_example/permissioned/controlled'); + $this->clickLink('examples/menu-example/permissioned/controlled'); $this->assertText('This menu entry will not show'); $this->drupalGet('examples/menu_altered_path'); -} + } } diff --git a/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php b/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php index ab0e021..d59ddf8 100644 --- a/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php +++ b/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php @@ -7,7 +7,7 @@ use Drupal\Tests\BrowserTestBase; /** * Test the user-facing menus in PHPUnit Example. * - * Note that this is _not_ a PHPUnit-based test. It's a functional + * Note that this is _not_ a PHPUnit-based test. It's a Functional * test of whether this module can be enabled properly. * * @ingroup phpunit_example diff --git a/simpletest_example/src/Tests/SimpleTestExampleMockModuleTest.php b/simpletest_example/src/Tests/SimpleTestExampleMockModuleTest.php index 596cfd3..9e43c59 100644 --- a/simpletest_example/src/Tests/SimpleTestExampleMockModuleTest.php +++ b/simpletest_example/src/Tests/SimpleTestExampleMockModuleTest.php @@ -8,7 +8,7 @@ use Drupal\simpletest\WebTestBase; * Demonstrate SimpleTest with a mock module. * * SimpleTestExampleMockModuleTestCase allows us to demonstrate how you can - * use a mock module to aid in functional testing in Drupal. + * use a mock module to aid in Functional testing in Drupal. * * If you have some functionality that's not intrinsic to the code under test, * you can add a special mock module that only gets installed during test diff --git a/simpletest_example/src/Tests/SimpleTestExampleTest.php b/simpletest_example/src/Tests/SimpleTestExampleTest.php index e5c93d4..41b2897 100644 --- a/simpletest_example/src/Tests/SimpleTestExampleTest.php +++ b/simpletest_example/src/Tests/SimpleTestExampleTest.php @@ -7,7 +7,7 @@ use Drupal\simpletest\WebTestBase; /** * Ensure that the simpletest_example content type provided functions properly. * - * The SimpleTestExampleTest is a functional test case, meaning that it + * The SimpleTestExampleTest is a Functional test case, meaning that it * actually exercises a particular sequence of actions through the web UI. * The majority of core test cases are done this way, but the SimpleTest suite * also provides unit tests as demonstrated in the unit test case example later