PHPackages                             globegroup/api-test-case - 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. globegroup/api-test-case

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

globegroup/api-test-case
========================

GlobeGroup Functional Unit Tests Library for Symfony ^4.3

1.3(6y ago)1527[4 PRs](https://github.com/globegroup/api-test-case/pulls)MITPHP

Since Nov 7Pushed 6y ago2 watchersCompare

[ Source](https://github.com/globegroup/api-test-case)[ Packagist](https://packagist.org/packages/globegroup/api-test-case)[ RSS](/packages/globegroup-api-test-case/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (15)Versions (8)Used By (0)

GlobeGroup Functional Unit Tests Library for Symfony 4.4
========================================================

[](#globegroup-functional-unit-tests-library-for-symfony-44)

```
composer require globegroup/api-test-case --dev

```

Every Functional test that you make for your API should extend `GlobeGroup\ApiTest\ApiTestCase`

This library allows you to easily load fixtures per every test, and restarts the database on before each test.

### Installation

[](#installation)

Create services.yml file under `config/packages/test/`

```
touch config/packages/test/services.yaml
```

Paste configuration to your newly created `services.yml`:

```
services:
  # Here comes configuration for oAuth
  test.oauth.user:
    class: App\Entity\User\User #your user entity
    public: true
    autowire: true

  test.oauth.client:
    class: App\Entity\OAuth2\Client #your oauth client entity
    public: true
    autowire: true

  test.oauth.token:
    class: App\Entity\OAuth2\AccessToken #your oauth access token entity
    public: true
    autowire: true
```

### Using

[](#using)

Create new test case that will test one endpoint (ws) that name will tell what is does like:

- `ListingModelTest` for testing lists,
- `CreatingModelTest` for testing creation of entities or models,
- `DeletingModelTest` for removing, marking as deleted or unassigning,
- `FetchingModelTest` for showing one model/entity,

Every test has to explain what it does in use-case, good practice is to write them as `snake\_case` Here are some examples: ```
/** @test */
function only_authorized_user_can_list_products() {
 ... your test goes here
}
```

```
  /** @test */
  function name_is_required() {
   ... your test goes here
  }
```

```
/** @test */
function not_found_when_no_category_provided() {
 ... your test goes here
}
```

---

### Changelog:

[](#changelog)

- v0.1 - ApiTestCase, Traits, loading fixtures, asserting json, asserting status code
- v1.0 - added oauth login, fixed array subset assertion, debug trait, changed to work in transaction
- v1.1 - changed to webtestcase
- v1.2 - added new fixtures way and fixed few problems

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~28 days

Total

3

Last Release

2326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fc302a9a5ef7cb20cc6d5bf725a1cb96e0ad4245fa14fbebc9ec6802bdabdc4?d=identicon)[globegroup](/maintainers/globegroup)

---

Top Contributors

[![filipzyminkowski](https://avatars.githubusercontent.com/u/57433811?v=4)](https://github.com/filipzyminkowski "filipzyminkowski (62 commits)")

### Embed Badge

![Health badge](/badges/globegroup-api-test-case/health.svg)

```
[![Health](https://phpackages.com/badges/globegroup-api-test-case/health.svg)](https://phpackages.com/packages/globegroup-api-test-case)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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