Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

Status: Active » Postponed (maintainer needs more info)

Checking search_api and config_split which both modules have CLI commands and automated tests for that.

It seems that only methods without the io and t callables are testable.

So the CLI service will require some rework to have methods expecting $io and $t and other methods which makes the real process and where those last methods do not require $io and $t and return results to be parsed to display the correct messages.

It can be done if we only had error message and a final success message, but we have intermediate message when handling pagination.

So keeping this issue opened to get feedbacks. Depending on the feedbacks and the priorities the tests will be implemented.

grimreaper’s picture

Priority: Normal » Major
sandboxpl’s picture

Checking following service https://git.drupalcode.org/project/entity_share/blob/8.x-2.x/modules/ent...

small progress messages returned in while loops , like this one:
https://git.drupalcode.org/project/entity_share/blob/8.x-2.x/modules/ent...

Aren't really neccessary, those are only informational, but removing them shouldn't provide any problems

grimreaper’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks @sandboxpl for the feedback.

grimreaper’s picture

Assigned: Unassigned » grimreaper
grimreaper’s picture

Status: Active » Needs review
StatusFileSize
new12.67 KB

Let's test refactoring.

I found that the update option is broken.

I will add tests now.

grimreaper’s picture

StatusFileSize
new20.24 KB

This time previous patch + the actual tests.

  • Grimreaper authored 71cf095 on 8.x-2.x
    Issue #3084249 by Grimreaper, sandboxpl: Tests: CLI commands
    
  • Grimreaper authored a5d91a2 on 8.x-2.x
    Issue #3084249 by Grimreaper, sandboxpl: Refactor CLI service to prepare...
grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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