# Installation

## Requirements

* PHP 7.4+
* Composer 2.0+

## Install WP\_Mock

Add WP\_Mock as a dev-dependency using Composer:

```shell
composer require --dev 10up/wp_mock
```

## Dependencies

WP\_Mock needs the following dependencies to work:

* PHPUnit ^9.5 (BSD 3-Clause license)
* Mockery ^1.6 (BSD 3-Clause license)
* Patchwork ^2.1 (MIT license)

They will be installed for you by Composer.

Next, you will need to configure PHPUnit first before enabling WP\_Mock. [Consult PHPUnit documentation](https://phpunit.de/documentation.html) for this step.

You will also need to [configure WP\_Mock with a bootstrap file](/documentation/getting-started/configuration.md) to use it in your tests.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wp-mock.gitbook.io/documentation/getting-started/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
