PHPackages                             otezvikentiy/codeception-symfony-http-client-mock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. otezvikentiy/codeception-symfony-http-client-mock

ActiveLibrary[Testing &amp; Quality](/categories/testing)

otezvikentiy/codeception-symfony-http-client-mock
=================================================

Codeception Module for Mocking HttpClient in Symfony

1.3.0(10mo ago)014MITPHPPHP ^8.1

Since Apr 25Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/OtezVikentiy/codeception-symfony-http-client-mock)[ Packagist](https://packagist.org/packages/otezvikentiy/codeception-symfony-http-client-mock)[ RSS](/packages/otezvikentiy-codeception-symfony-http-client-mock/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (5)Used By (0)

Codeception Symfony HttpClient Mock
===================================

[](#codeception-symfony-httpclient-mock)

Mock module for Symfony + Codeception + HttpClient

Installation
------------

[](#installation)

```
composer require otezvikentiy/codeception-symfony-http-client-mock --dev
```

Configuration
-------------

[](#configuration)

1. Add to your Functional.suite.yaml

```
modules:
    enabled:
        - OtezVikentiy\CodeceptionHttpMock\HttpMockModule
    config:
        OtezVikentiy\CodeceptionHttpMock\HttpMockModule:
            http_client_service_name: 'http_client'
```

2. Configure your Symfony services.yaml as follows

```
when@test:
    services:
        _defaults:
            public: true

        # turn off project factory
        # replace this path with the path to your factory
        App\Infrastructure\HttpClient\HttpClientFactory:
            class: stdClass

        # replace the client with mock
        http_client:
            class: OtezVikentiy\CodeceptionHttpMock\HttpClient\HttpClientMock
            factory: ['OtezVikentiy\CodeceptionHttpMock\HttpClient\HttpClientMock', 'getInstance']
```

3. Usage in tests

```
    final public function someTest(FunctionalTester $I): void
    {
        $I->expectHttpRequest('DELETE', '/example/v1/orders')
            ->withBody(json_encode([
                'id' => '01f5cfeb-007e-11e5-82bf-9c8e99f9e058',
            ]))
            ->respondWith(status: 200, body: json_encode([
                    'Result' => 'Ok',
                ], JSON_UNESCAPED_UNICODE));

        $I->sendPost('/api/v3', '{"field": "value"}';

        $I->seeResponseCodeIs(200);
    }
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance53

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Total

4

Last Release

324d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19647948?v=4)[OtezVikentiy](/maintainers/OtezVikentiy)[@OtezVikentiy](https://github.com/OtezVikentiy)

---

Top Contributors

[![OtezVikentiy](https://avatars.githubusercontent.com/u/19647948?v=4)](https://github.com/OtezVikentiy "OtezVikentiy (5 commits)")

---

Tags

symfonyhttp clientcodeceptionmocktests

### Embed Badge

![Health badge](/badges/otezvikentiy-codeception-symfony-http-client-mock/health.svg)

```
[![Health](https://phpackages.com/badges/otezvikentiy-codeception-symfony-http-client-mock/health.svg)](https://phpackages.com/packages/otezvikentiy-codeception-symfony-http-client-mock)
```

###  Alternatives

[mcustiel/phiremock-codeception-extension

Codeception extension for Phiremock. Allows to stub remote services for HTTP requests.

311.1M6](/packages/mcustiel-phiremock-codeception-extension)[codeception/module-symfony

Codeception module for Symfony framework

9610.1M143](/packages/codeception-module-symfony)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
