Registry / testing / phpunit-dbunit

phpunit-dbunit

JSON →
library4.0.0phppackagistunverified

PHPUnit extension for database interaction testing, providing dataset and operation support.

composer require phpunit/dbunit
INSTALL
IMPORT
SIG · PHPUNIT-DBUNIT
P
phpunit-dbunit
testingphpv4.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TestCaseTrait
use PHPUnit\DbUnit\TestCaseTrait;

Sets up a database test case with a connection and dataset.

use PHPUnit\DbUnit\TestCaseTrait; class MyDatabaseTest extends \PHPUnit\Framework\TestCase { use TestCaseTrait; public function getConnection() { $pdo = new PDO('sqlite::memory:'); return $this->createDefaultDBConnection($pdo); } public function getDataSet() { return $this->createFlatXMLDataSet(__DIR__ . '/fixtures/seed.xml'); } }
Debug
Known issues
breakingDbUnit is deprecated in favor of PHPUnit's built-in database testing features.
fix
Migrate to PHPUnit's native database testing or use a modern alternative.
affects: >=4.0
Upgrade
Version history
4.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
Amazon
1
Resources
phpunit-dbunit — pip install phpunit-dbunit · libregistry