Automattic / Automattic/jetpack

Connection: add unit tests for Client methods.

Open
#17,466 0 comments 0 reactions 0 assignees View on GitHub
[Package] Connection [Pri] Low Unit Tests
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

#### Is your feature request related to a problem? Please describe.
* No.

#### Describe the solution you'd like
* We don't have unit tests for some of the Client methods. Add unit tests for the `wpcom_json_api_request_as_user`, `wpcom_json_api_request_as_blog`, and `validate_args_for_wpcom_json_api_request` methods.

#### Describe alternatives you've considered
* n/a

#### Additional context
* n/a

Contributor guide

Open the contributing guide

Research direction

Locate the Connection Client implementation and inspect the wpcom_json_api_request_as_user, wpcom_json_api_request_as_blog, and validate_args_for_wpcom_json_api_request methods. Find the existing unit-test structure for this client, then add coverage for the named methods; done means each method and its argument validation behavior is tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
api, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.