https://api.drupal.org/api/drupal/core%21core.api.php/group/testing/8.5....

 * @section running Running tests
 * You can run both Simpletest and PHPUnit tests by enabling the core Testing
 * module (core/modules/simpletest). Once that module is enabled, tests can be
 * run using the core/scripts/run-tests.sh script, using
 * @link https://www.drupal.org/project/drush Drush @endlink, or from the
 *   Testing module user interface.

drush run-test command was removed a long time ago.
https://github.com/drush-ops/drush/issues/1362

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chi created an issue. See original summary.

d.olaresko’s picture

Issue tags: +Moldcamp2017

I`m working on it.

d.olaresko’s picture

Status: Active » Needs review
FileSize
703 bytes

The patch is provided.

Chi’s picture

+ https://www.drupal.org/docs/7/testing/running-tests-through-command-line
I suppose in this URL 7 stands for Drupal 7. Though the document contains some relevant information I would not push this link the code because its status is unclear.

https://www.drupal.org/node/645286/discuss#comment-12297392

wengerk’s picture

I just read the patch in #3 and saw we link to https://www.drupal.org/docs/7/testing/running-tests-through-command-line.
It's seems fine but we should link to the Drupal 8 doc, no ? Something such as : https://www.drupal.org/docs/8/phpunit/running-phpunit-tests

What do you think ?

d.olaresko’s picture

Hello.

You are totally right.
I think the guide https://www.drupal.org/docs/8/phpunit/running-phpunit-tests is better in this case.

Patch updated.

Thank you.

Chi’s picture

I've just moved the page to Drupal 8 documentation but it has not yet been reviewed by its maintainer(s). Anyway I propose using canonical node URL as the alias can be changed over time.
https://www.drupal.org/node/645286

d.olaresko’s picture

The patch is updated based on last comment from Chi.

Thank you.

Chi’s picture

Status: Needs review » Needs work
+ * @link https://www.drupal.org/node/645286 Running PHPUnit tests @endlink, or from the
  *   Testing module user interface.

Please reformat this using 80 characters line limit to comply with Drupal coding standards.

d.olaresko’s picture

Status: Needs work » Needs review
FileSize
760 bytes

Reformatted using 80 characters.

Thanks.

Chi’s picture

+ * @link https://www.drupal.org/node/645286 Running PHPUnit tests @endlink,
There is still some place on this line to put 'or' without exceeding limit.

d.olaresko’s picture

Updated the text.

Chi’s picture

+ * from the
  *   Testing module user interface.

Please set this to one line as it was in #10.

d.olaresko’s picture

New patch uploaded

Chi’s picture

Status: Needs review » Needs work

@d.olaresko, new patch is identical to the one in #12.

wengerk’s picture

Re-reolled as requested in #13 & #15

wengerk’s picture

Status: Needs work » Needs review
Chi’s picture

Status: Needs review » Reviewed & tested by the community

Thanks.

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the patch! Good find.

The clause now reads as "using [...] Running PHPunit tests", which doesn't really make sense in English. I'd suggest:

Once that module is enabled, tests can be run on through the Testing module's user interface or on the command line. See * @link https://www.drupal.org/node/645286 Running PHPUnit tests @endlink for more information.

wengerk’s picture

re-rolled as suggested in #19.

wengerk’s picture

Status: Needs work » Needs review
Chi’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

xjm’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/core.api.php
@@ -1195,9 +1195,9 @@
  * @section running Running tests
  * You can run both Simpletest and PHPUnit tests by enabling the core Testing
  * module (core/modules/simpletest). Once that module is enabled, tests can be
- * run using the core/scripts/run-tests.sh script, using
- * @link https://www.drupal.org/project/drush Drush @endlink, or from the
- *   Testing module user interface.
+ * run on through the Testing module's user interface or on the command line.
+ * See @link https://www.drupal.org/node/645286 Running PHPUnit tests @endlink
+ * for more information.
  *
  * PHPUnit tests can also be run from the command line, using the PHPUnit
  * framework. See https://www.drupal.org/node/2116263 for more information.

We also need to remove the following paragraph -- the current patch makes the docs repeat themselves.

Thanks!

wengerk’s picture

Yeah I understand your concern. But for me the two links are far different & both should be present.

https://www.drupal.org/node/645286
Running tests through command-line with run-tests.sh

https://www.drupal.org/node/2116263
Running PHPUnit tests using the phpunit binary

It thinks we have to change the texts to reflect this 2 testing methods.

What about ?

 * @section running Running tests
 * You can run both Simpletest and PHPUnit tests by enabling the core Testing
 * module (core/modules/simpletest). Once that module is enabled, tests can be
 * run on through the Testing module's user interface or on the command line.
 *
 * See @link https://www.drupal.org/node/2116263 Running tests with PHPUnit binary @endlink
 * or @link https://www.drupal.org/node/645286 Running tests with run-tests.sh @endlink
 * for more informations.
Chi’s picture

Issue summary: View changes
@link https://www.drupal.org/node/645286 Running 
 * tests with run-tests.sh @endlink

I wonder if it is allowed to have link text on multiple lines.

wengerk’s picture

Yes you're right @chi !

Let's suggest a patch & see what the community think about it :D !

wengerk’s picture

FileSize
980 bytes
wengerk’s picture

Status: Needs work » Needs review

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Daniel Gillespie’s picture

Picked this up at DrupalCamp Scotland

Daniel Gillespie’s picture

Patch installs correctly and the links work as planned.

idebr’s picture

Status: Needs review » Needs work
+++ b/core/core.api.php
@@ -1195,12 +1195,11 @@
+ * See @link https://www.drupal.org/node/2116263 Running tests with PHPUnit binary @endlink
+ * or @link https://www.drupal.org/node/645286 Running tests with run-tests.sh @endlink
+ * for more information.

These lines now exceed the Drupal coding standards: Line exceeds 80 characters. This can be fixed by reflowing the lines of the comment to a maximum of 80 characters per line.

[edit]
#25 Yes, it is allowed to have a @link text across multiple lines. See the following text in core.api.php for an example:

* A plugin collection is a class that extends
* \Drupal\Component\Plugin\LazyPluginCollection or one of its subclasses; there
* are several examples in Drupal Core. If your plugin type uses a plugin
* collection, it will usually also have a configuration entity, and the entity
* class should implement
* \Drupal\Core\Entity\EntityWithPluginCollectionInterface. Again, there are
* several examples in Drupal Core; see also the @link config_api Configuration
* API topic @endlink for more information about configuration entities.

dawehner’s picture

One suggestion: It could be nice to link to core/tests/README.md as well.

wengerk’s picture

Fix the Drupal coding standards: Line exceeds 80 characters as suggested on #32.

About #33 It could be a great idea, do you have any suggestion how to introduce this link ? Also before or after the current ones ?

wengerk’s picture

Status: Needs work » Needs review

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

vishwac9’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +ContributionWeekend2019

Patch applied cleanly, changing the status to RTBC

Terminal Status:
MacBook-Pro-10:drupal$ git checkout 8.7.x
Checking out files: 100% (14675/14675), done.
Switched to branch '8.7.x'
Your branch is up-to-date with 'origin/8.7.x'.
MacBook-Pro-10:drupal$ git apply -v ~/Downloads/2916021-34.patch
Checking patch core/core.api.php...
Applied patch core/core.api.php cleanly.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +Needs followup

#33 is correct - this should be pointing to that readme but also let's not wait for that because this documentation is wrong and therefore completely unhelpful. Someone can open a follow-up to do that - or maybe completely remove this section.

Committed and pushed 18c14670a2 to 8.7.x and 5cc3979f48 to 8.6.x. Thanks!

  • alexpott committed 18c1467 on 8.7.x
    Issue #2916021 by d.olaresko, wengerk, Chi, xjm, dawehner, idebr: Update...

  • alexpott committed 5cc3979 on 8.6.x
    Issue #2916021 by d.olaresko, wengerk, Chi, xjm, dawehner, idebr: Update...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.