PHPackages                             bauhaus/dbasserture - 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. [Database &amp; ORM](/categories/database)
4. /
5. bauhaus/dbasserture

ActiveLibrary[Database &amp; ORM](/categories/database)

bauhaus/dbasserture
===================

DB fixture and assertion for integration tests

v1.6.0(5y ago)114.4k↑23.9%[2 issues](https://github.com/bauhausphp/dbasserture/issues)[2 PRs](https://github.com/bauhausphp/dbasserture/pulls)MITPHPPHP ^8.0

Since Feb 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bauhausphp/dbasserture)[ Packagist](https://packagist.org/packages/bauhaus/dbasserture)[ RSS](/packages/bauhaus-dbasserture/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (8)Dependencies (2)Versions (14)Used By (0)

[![Build Status](https://camo.githubusercontent.com/f7e210b06a82b129e947aa4c42b49d17c0f3e8c9df212b682e72ad99bc3899ec/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f626175686175737068702f64626173736572747572652f4275696c643f7374796c653d666c61742d737175617265)](https://github.com/bauhausphp/dbasserture/actions?query=workflow%3ABuild)[![Coverage](https://camo.githubusercontent.com/d1067ada2d504bbb18bb3ac9e0f831f8296fe431360f45525eee6873fea85756/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f626175686175737068702f64626173736572747572653f7374796c653d666c61742d737175617265)](https://codecov.io/gh/bauhausphp/dbasserture)

[![Stable Version](https://camo.githubusercontent.com/562f2d3ebb8b130367479fcc3ebf36f3935aea4f7fb225532ac730d30be259f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626175686175732f64626173736572747572653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bauhaus/dbasserture)[![Downloads](https://camo.githubusercontent.com/766b3431669f0faada6ee91be54b1628bd8008ec3e11bb2bf012faec25d29f62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626175686175732f64626173736572747572653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bauhaus/dbasserture)[![PHP Version](https://camo.githubusercontent.com/0406f80d2d5abac0b2cb9218daaa505d9b824d0f8e071fbba765b68ca5523f72/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626175686175732f64626173736572747572653f7374796c653d666c61742d737175617265)](composer.json)[![License](https://camo.githubusercontent.com/855023244f3cfecc7b082f5782e915100033618202c507e1c683971d1fa99e93/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626175686175737068702f64626173736572747572653f7374796c653d666c61742d737175617265)](LICENSE)

DB Asserture
============

[](#db-asserture)

This tool aims to help the DB setup and assertion in a integration tests context.

```
use Bauhaus\DbAsserture\DbAssertureFactory;

$factory = new DbAssertureFactory();
$dbAsserture = $factory->fromDsn('mysql://user:pass@host:port/dbname');

// Clean tables
$dbAsserture->clean('table_name', 'another_table_name');

// Insert registers
$dbAsserture->insert('table_name', ['id' => 1, 'name' => 'Name']);
$dbAsserture->insert('table_name',
    ['id' => 1, 'name' => 'Name'],
    ['id' => 2, 'name' => 'Another name'],
);

// Select registers
$dbAsserture->select('table_name', ['name' => 'John']); // return many registers with all fields matching provided filter
$dbAsserture->selectOne('table_name', ['id' => 1]); // return one register with all fields matching provided filters

// Assert if is registered in database
$dbAsserture->assertOneIsRegistered('table_name', ['id' => 1, 'name' => 'Name']); // return true or throw exception
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 80.8% 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 ~77 days

Recently: every ~32 days

Total

10

Last Release

1996d ago

PHP version history (2 changes)v1.1.0PHP ^7.4

v1.6.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e02f16abf8dcb9c7e0bbd66c3ccd5e01821b12e70eee6f0f38a727f204d07f37?d=identicon)[fefas](/maintainers/fefas)

---

Top Contributors

[![fefas](https://avatars.githubusercontent.com/u/6557756?v=4)](https://github.com/fefas "fefas (42 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")

---

Tags

databasetestsbauhaus

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bauhaus-dbasserture/health.svg)

```
[![Health](https://phpackages.com/badges/bauhaus-dbasserture/health.svg)](https://phpackages.com/packages/bauhaus-dbasserture)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k605.0M6.8k](/packages/doctrine-dbal)[doctrine/orm

Object-Relational-Mapper for PHP

10.2k300.5M7.5k](/packages/doctrine-orm)[doctrine/doctrine-bundle

Symfony DoctrineBundle

4.8k254.4M4.1k](/packages/doctrine-doctrine-bundle)[doctrine/migrations

PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.

4.8k217.3M548](/packages/doctrine-migrations)[doctrine/data-fixtures

Data Fixtures for all Doctrine Object Managers

2.9k143.6M586](/packages/doctrine-data-fixtures)[robmorgan/phinx

Phinx makes it ridiculously easy to manage the database migrations for your PHP app.

4.5k48.7M460](/packages/robmorgan-phinx)

PHPackages © 2026

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