gabyquiles/doctrine-context

Behat Context to allow create and drop a DB schema before each Scenario

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/gabyquiles/doctrine-context

dev-master 2019-02-16 18:45 UTC

This package is auto-updated.

Last update: 2025-09-17 11:47:12 UTC


README

#Behat Doctrine Context This package tries to help when testing with doctrine. Its main goal is to drop and recreate a database based on Doctrine Metadata while testing with Behat.

Configuration

In order to enable it in behat you need to have a similar behat.yml

default:
  suites:
    default:
      contexts:
     ...
      - GabyQuiles\Behat\Context\DoctrineContext:
          entityManager: '@doctrine.orm.entity_manager'

Usage

When creating your Behat scenarios

  • Add @createSchema in your first scenario in order to create a new database
  • Add @dropSchema in your last scenario in order to drop your database