You are here

Example: PHPUnit in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 phpunit_example/phpunit_example.module \phpunit_example

This example demonstrates PHPUnit for Drupal 8 unit testing.

Parent topics

File

modules/phpunit_example/phpunit_example.module, line 8
Module file for phpunit_example.

Classes

Namesort descending Location Description
AddClass modules/phpunit_example/src/AddClass.php A class with features to show how to do unit testing.
AddClassTest modules/phpunit_example/tests/src/Unit/AddClassTest.php AddClass units tests.
DisplayManager modules/phpunit_example/src/DisplayManager.php An example class to demonstrate unit testing.
DisplayManagerTest modules/phpunit_example/tests/src/Unit/DisplayManagerTest.php DisplayManager unit test with doubles.
PHPUnitExampleMenuTest modules/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php Test the user-facing menus in PHPUnit Example.
ProtectedPrivates modules/phpunit_example/src/ProtectedPrivates.php A class with features to show how to do unit testing.
ProtectedPrivatesSubclass modules/phpunit_example/tests/src/Unit/Subclasses/ProtectedPrivatesSubclass.php A class for testing ProtectedPrivate::protectedAdd().
ProtectedPrivatesTest modules/phpunit_example/tests/src/Unit/ProtectedPrivatesTest.php ProtectedPrivates unit testing of restricted methods.

Interfaces

Namesort descending Location Description
DisplayInfoInterface modules/phpunit_example/src/DisplayInfoInterface.php An interface to objects that provide displayable information.