PHPackages                             l0wskilled/api-platform-test - 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. l0wskilled/api-platform-test

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

l0wskilled/api-platform-test
============================

Bundle to ease the test of Endpoints generated by ApiPlatform.

v0.2.0(3y ago)21.6k[4 PRs](https://github.com/epubli/api-platform-test/pulls)1MITPHPPHP &gt;=7.4

Since Nov 20Pushed 2y ago2 watchersCompare

[ Source](https://github.com/epubli/api-platform-test)[ Packagist](https://packagist.org/packages/l0wskilled/api-platform-test)[ RSS](/packages/l0wskilled-api-platform-test/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (27)Used By (1)

API Platform Test
=================

[](#api-platform-test)

Bundle to ease the test of Endpoints generated by ApiPlatform.

You may want to have a look at:

### Usage

[](#usage)

If you want a simple CRUD Testing for your entity just extend the ApiPlatformTestCase and override the endpoint and the resource class

```
/** Endpoint to test (override in your testcase) */
protected const RESOURCE_URI = '/';
/** Entity class to test (override in your testcase) */
protected const RESOURCE_CLASS = '';
```

##### ORM only

[](#orm-only)

Since v0.3.0 we only support ORM.

##### ORM Example Test class

[](#orm-example-test-class)

```
class ExampleTest extends ApiPlatformTestCase
{

    protected const RESOURCE_URI = '/api/example/';
    protected const RESOURCE_CLASS = Example::class;

    protected function getTestEntity(): Example
    {
        $example = new Example();
        $example->setLocale(static::$faker->countryCode());
        $example->setStandard(false);
        $example->setTitle(static::$faker->country());
        return $example;
    }

}
```

With this setup common CRUD-Tests will be executed.

If you want to adjust the behaviour of some Test-Cases just override the default Test-Case

For e.g.

```
    public function testReadAResourceCollection(): void
    {
        parent::testReadAResourceCollection();
        $this->assertCollectionCount(3);
    }

    public function testReadAResource(): void
    {
        parent::testReadAResource();
        $this->assertResourcePropertyCount(10);
    }
```

During the testing the entities get serialized by the symfony serializer. This can serialize attributes you don't want to compare, especially if you have circular references.

For this case you can provide a list of ignored attributes. These will be skipped during serialization.

```
    protected function getIgnoredAttributes(): array
    {
        return ['children'];
    }
```

If you do not have all CRUD Operations available you can override the unsupported test with a route not available test to ensure this.

```
    public function testCreateAResource(): void
    {
        $this->testThrowErrorWhenRouteIsForbidden();
        parent::testCreateAResource();
    }
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.2% 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 ~46 days

Recently: every ~213 days

Total

22

Last Release

1395d ago

PHP version history (2 changes)v0.1PHP &gt;=7.1

v0.2.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/77d3ab602abb0841ec145e20fdcdfa622238ec34f0bbda69ef2275a5c87a44f3?d=identicon)[l0wskilled](/maintainers/l0wskilled)

---

Top Contributors

[![StefanGithubbbb](https://avatars.githubusercontent.com/u/60654484?v=4)](https://github.com/StefanGithubbbb "StefanGithubbbb (20 commits)")[![l0wskilled](https://avatars.githubusercontent.com/u/8630042?v=4)](https://github.com/l0wskilled "l0wskilled (1 commits)")

### Embed Badge

![Health badge](/badges/l0wskilled-api-platform-test/health.svg)

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

###  Alternatives

[sylius/sylius

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

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

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[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)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[trappar/alice-generator-bundle

Symfony bundle for generating Alice fixtures from Doctrine entities

45169.6k1](/packages/trappar-alice-generator-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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