PHPackages                             51systems/doctrine-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. 51systems/doctrine-test

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

51systems/doctrine-test
=======================

Doctrine2 Testing Library

0.1.2(12y ago)0185LGPL-3.0PHPPHP &gt;=5.3

Since Sep 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/51systems/doctrine-test)[ Packagist](https://packagist.org/packages/51systems/doctrine-test)[ Docs](https://github.com/51systems/doctrine-test)[ RSS](/packages/51systems-doctrine-test/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

This is a basic Doctrine2 Test Library to be used with PHPUnit.

\#Contributors:

- [Cameron Manderson](https://github.com/cammanderson)
- [Dustin Thomson](https://github.com/51systems)

Features
========

[](#features)

- SQLite in-memory database used for tests
- Fixture Support
- Subscriber support

Installation
============

[](#installation)

Install via composer.

Writing tests
=============

[](#writing-tests)

```
namespace Application\Test\Entity;

class MyModelTest extends EntityTestCase
{
    //If you need to set the application module configuration, because you are
    //not using a custom bootloader for tests, then use the trait
    use ServiceLocatorAwareTestTrait;

    public function setUp()
    {
        // Load the database schemas
        $this->loadSchemas(array('Entity\MyEntity')); // Load as many needed for the tests

        // Optionally, you can load fixtures
        $this->loadFixture('DataFixtures\ORM\MyFixture');

        // You can also load subscribers, like registering sluggable, timestampable etc behaviour
        //$myListener = new Listener\MyListener();
        //$this->addLifecycleEventSubscriber($myListener);

        //If using the ServiceLocatorAwareTestTrait
        $configOverrides = [];
        $this->setApplicationConfig(ArrayUtils::merge(
            include __DIR__ . '/PATH TO YOUR APPLICATION CONFIG/application.config.php',
            $configOverrides
        ));
    }

    public function testCreate()
    {
        // Get the entity manager for managing persistence etc.
        $em = $this->getEntityManager();

        // Test a create
        $myEntity = new Entity\MyEntity;
        $myEntity->setTitle('Hello World');
        $em->persist();

        // Test we issued SQL to the database
        $this->assertEquals(1, $this->getQueryCount(), 'Should have executed one query to the database');

        // Test the generation of an ID
        $this->assertNotEmpty($myEntity->getId(), 'Should have got an ID for my entity');

    }

    protected function getServiceLocator() {
        return \Application\Test\Bootstrap::getServiceManager();
    }
}
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~20 days

Total

2

Last Release

4646d ago

### Community

Maintainers

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

---

Top Contributors

[![powturns](https://avatars.githubusercontent.com/u/658883?v=4)](https://github.com/powturns "powturns (12 commits)")[![cammanderson](https://avatars.githubusercontent.com/u/578846?v=4)](https://github.com/cammanderson "cammanderson (3 commits)")

---

Tags

phpunittestdoctrine

### Embed Badge

![Health badge](/badges/51systems-doctrine-test/health.svg)

```
[![Health](https://phpackages.com/badges/51systems-doctrine-test/health.svg)](https://phpackages.com/packages/51systems-doctrine-test)
```

###  Alternatives

[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[lchrusciel/api-test-case

Perfect PHPUnit TestCase for JSON/XML API TDD with Symfony.

4125.8M69](/packages/lchrusciel-api-test-case)[oro/platform

Business Application Platform (BAP)

642140.7k105](/packages/oro-platform)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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