diff --git a/core/core.api.php b/core/core.api.php index 71ec024..9e422c0 100644 --- a/core/core.api.php +++ b/core/core.api.php @@ -1091,7 +1091,7 @@ * write a PHPUnit test: * - Define a class that extends \Drupal\Tests\UnitTestCase. * - The class name needs to end in the word Test. - * - The namespace must be a subspace/subdirectory of \Drupal\yourmodule\Tests, + * - The namespace must be a subspace/subdirectory of \Drupal\yourmodule\Tests\Unit, * where yourmodule is your module's machine name. * - The test class file must be named and placed under the * yourmodule/tests/src/Unit directory, according to the PSR-4 standard. @@ -1117,10 +1117,8 @@ * (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 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 - * directory, according to the PSR-4 standard. + * - The test needs to go in yourmodule/tests/src/Kernel and have a namespace + * of \Drupal\yourmodule\Tests\Kernel * - Your test class needs a phpDoc comment block with a description and * a @group annotation, which gives information about the test. * - You may also override the default setUp() method, which can set be used to @@ -1168,7 +1166,7 @@ * To write a functional test that relies on JavaScript: * - Extend \Drupal\FunctionalJavaScriptTests\JavascriptTestBase. * - Place the test into the yourmodule/tests/src/FunctionalJavascript/ - * directory and use the \Drupal\Tests\yourmodule\FunctionalJavascript + * directory and use the \Drupal\yourmodule\Tests\FunctionalJavascript * namespace. * - Add a @group annotation. Use yourmodule as the group name if the test does * not belong to another larger group.