diff --git a/core/modules/simpletest/src/KernelTestBase.php b/core/modules/simpletest/src/KernelTestBase.php index 5f0183a..ec34c53 100644 --- a/core/modules/simpletest/src/KernelTestBase.php +++ b/core/modules/simpletest/src/KernelTestBase.php @@ -30,6 +30,8 @@ * * @see \Drupal\simpletest\KernelTestBase::$modules * @see \Drupal\simpletest\KernelTestBase::enableModules() + * + * @ingroup testing */ abstract class KernelTestBase extends UnitTestBase { diff --git a/core/modules/system/core.api.php b/core/modules/system/core.api.php index 765f9e4..8c48e37 100644 --- a/core/modules/system/core.api.php +++ b/core/modules/system/core.api.php @@ -725,7 +725,7 @@ * PHPUnit tests for classes are written using the industry-standard PHPUnit * framework. Use a PHPUnit test to test functionality of a class if the Drupal * environment (database, settings, etc.) and web browser are not needed for the - * test, or if the Drupal environment can be replaced by a "mocking" class. To + * test, or if the Drupal environment can be replaced by a "mock" object. To * write a PHPUnit test: * - Define a class that extends \Drupal\Tests\UnitTestCase. * - The class name needs to end in the word Test. @@ -753,17 +753,15 @@ * - For functional tests of the web output of Drupal, define a class that * extends \Drupal\simpletest\WebTestBase, which contains an internal web * browser and defines many helpful test assertion methods that you can use - * in your tests. You can define additional modules to be enabled by - * overriding the $modules member variable -- keep in mind that by default, - * WebTestBase uses a "testing" install profile, with a minimal set of - * modules enabled. + * in your tests. You can specify modules to be enabled by defining a + * $modules member variable -- keep in mind that by default, WebTestBase uses + * a "testing" install profile, with a minimal set of modules enabled. * - For functional tests that do not test web output, define a class that - * extends \Drupal\simpletest\DrupalUnitTestBase. This class is much faster + * extends \Drupal\simpletest\KernelTestBase. This class is much faster * than WebTestBase, because instead of making a full install of Drupal, it * uses an in-memory pseudo-installation (similar to what the installer and * update scripts use). To use this test class, you will need to create the * database tables you need and install needed modules manually. - * - The class name needs to end in the word Test. * - The namespace must be a subspace/subdirectory of \Drupal\yourmodule\Tests, * where yourmodule is your module's machine name. * - The test class file must be named and placed under the yourmodule/src/Tests @@ -792,7 +790,8 @@ * @link https://drupal.org/project/drush Drush @endlink, or from the Testing * module user interface. * - * PHPUnit tests can also be run from the PHPUnit framework. + * PHPUnit tests can also be run from the command line, using the PHPUnit + * framework. See https://drupal.org/node/2116263 for more information. * @} */