An open API service indexing awesome lists of open source software.

https://github.com/cspray/database-testing-pdo


https://github.com/cspray/database-testing-pdo

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

# cspray/database-testing-pdo

A connection adapter for [`cspray/database-testing`](https://github.com/cspray/database-testing) that allows you to
use a PDO connection for testing database interactions.

## Installation

Composer is the only supported means to install this package.

```shell
composer require --dev cspray/database-testing-pdo
```

## Quick Start

This library works by providing an implementation of the `Cspray\DatabaseTesting\ConnectionAdapter\ConnectionAdapter` interface, along with a variety of `Cspray\DatabaseTesting\ConnectionAdapter\ConnectionAdapterFactory` implementations designed to work with common databases. Check out the example appropriate for your database below or check out the "Database Connection Adapter Reference"!

All examples below will use code from the `cspray/database-testing-phpunit` extension. If you're using a different testing framework you may need to adjust your code as appropriate.

### Postgres

```php