Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#34 | interdiff-2916021-27-34.txt | 711 bytes | wengerk |
#34 | 2916021-34.patch | 980 bytes | wengerk |
#27 | 2916021-27.patch | 980 bytes | wengerk |
#20 | 2916021-20.patch | 862 bytes | wengerk |
#10 | 2916021_4_update_running_tests_core_api_php.patch | 760 bytes | d.olaresko |
Comments
Comment #2
d.olaresko CreditAttribution: d.olaresko at Adyax commentedI`m working on it.
Comment #3
d.olaresko CreditAttribution: d.olaresko at Adyax commentedThe patch is provided.
Comment #4
Chi CreditAttribution: Chi commented+ 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
Comment #5
wengerkI 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 ?
Comment #6
d.olaresko CreditAttribution: d.olaresko at Adyax commentedHello.
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.
Comment #7
Chi CreditAttribution: Chi commentedI'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
Comment #8
d.olaresko CreditAttribution: d.olaresko at Adyax commentedThe patch is updated based on last comment from Chi.
Thank you.
Comment #9
Chi CreditAttribution: Chi commentedPlease reformat this using 80 characters line limit to comply with Drupal coding standards.
Comment #10
d.olaresko CreditAttribution: d.olaresko at Adyax commentedReformatted using 80 characters.
Thanks.
Comment #11
Chi CreditAttribution: Chi commented+ * @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.
Comment #12
d.olaresko CreditAttribution: d.olaresko at Adyax commentedUpdated the text.
Comment #13
Chi CreditAttribution: Chi commentedPlease set this to one line as it was in #10.
Comment #14
d.olaresko CreditAttribution: d.olaresko at Adyax commentedNew patch uploaded
Comment #15
Chi CreditAttribution: Chi commented@d.olaresko, new patch is identical to the one in #12.
Comment #16
wengerkRe-reolled as requested in #13 & #15
Comment #17
wengerkComment #18
Chi CreditAttribution: Chi commentedThanks.
Comment #19
xjmThanks 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:
Comment #20
wengerkre-rolled as suggested in #19.
Comment #21
wengerkComment #22
Chi CreditAttribution: Chi commentedLooks good to me.
Comment #23
xjmWe also need to remove the following paragraph -- the current patch makes the docs repeat themselves.
Thanks!
Comment #24
wengerkYeah 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 ?
Comment #25
Chi CreditAttribution: Chi commentedI wonder if it is allowed to have link text on multiple lines.
Comment #26
wengerkYes you're right @chi !
Let's suggest a patch & see what the community think about it :D !
Comment #27
wengerkComment #28
wengerkComment #30
Daniel Gillespie CreditAttribution: Daniel Gillespie as a volunteer commentedPicked this up at DrupalCamp Scotland
Comment #31
Daniel Gillespie CreditAttribution: Daniel Gillespie as a volunteer commentedPatch installs correctly and the links work as planned.
Comment #32
idebr CreditAttribution: idebr at ezCompany commentedThese 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:
Comment #33
dawehnerOne suggestion: It could be nice to link to
core/tests/README.md
as well.Comment #34
wengerkFix 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 ?
Comment #35
wengerkComment #37
vishwac9 CreditAttribution: vishwac9 as a volunteer and at Material commentedPatch 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.
Comment #38
alexpott#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!