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(9mo ago)014MITPHPPHP ^8.1

Since Apr 25Pushed 9mo 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 1mo ago

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

32

—

LowBetter than 72% of packages

Maintenance58

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

270d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f657af8595c7a4ea2cd722fed53f73ef305b87ecd8286968a0c261d005001f5?d=identicon)[OtezVikentiy](/maintainers/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

[dama/doctrine-test-bundle

Symfony bundle to isolate doctrine database tests and improve test performance

1.2k37.2M143](/packages/dama-doctrine-test-bundle)[codeception/module-symfony

Codeception module for Symfony framework

949.4M95](/packages/codeception-module-symfony)[mcustiel/phiremock-codeception-extension

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

311.0M5](/packages/mcustiel-phiremock-codeception-extension)[happyr/service-mocking

Make it easy to mock services in a built container

48253.8k2](/packages/happyr-service-mocking)[janmarek/mockista

Mockista is library for mocking, which I've written, because I find mocking in PHPUnit awful.

29221.0k28](/packages/janmarek-mockista)[mcustiel/codeception-http-mock

Extension for HTTP Mock.

1424.3k1](/packages/mcustiel-codeception-http-mock)

PHPackages © 2026

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