parameters:
    env(DB_ENGINE): "pdo_sqlite" # also pdo_pgsql, pdo_mysql
    env(DB_HOST): "localhost"
    env(DB_NAME): "orm_behaviors_test"
    env(DB_USER): "root"
    env(DB_PASSWD): ""
    env(DB_MEMORY): "true"
    kernel.secret: "for_framework_bundle"
    locale: "en"

services:
    _defaults:
        public: true
        autowire: true

    Symfony\Component\Security\Core\Security: null
    Psr\Log\Test\TestLogger: null

    # for translatable
    Knp\DoctrineBehaviors\Tests\Provider\TestLocaleProvider: null
    Knp\DoctrineBehaviors\Contract\Provider\LocaleProviderInterface: '@Knp\DoctrineBehaviors\Tests\Provider\TestLocaleProvider'

    # for blameable
    Knp\DoctrineBehaviors\Tests\Provider\TestUserProvider: null
    Knp\DoctrineBehaviors\Contract\Provider\UserProviderInterface: '@Knp\DoctrineBehaviors\Tests\Provider\TestUserProvider'

    Knp\DoctrineBehaviors\Tests\DatabaseLoader:  null

    Knp\DoctrineBehaviors\EventSubscriber\LoggableEventSubscriber:
        arguments:
            $logger: '@Psr\Log\Test\TestLogger'
        tags:
            - { name: "doctrine.event_subscriber"}

doctrine:
    dbal:
        dbname: "%env(DB_NAME)%"
        host: "%env(DB_HOST)%"
        user: "%env(DB_USER)%"
        password: "%env(DB_PASSWD)%"
        driver: "%env(DB_ENGINE)%"
        memory: "%env(bool:DB_MEMORY)%"

    # creates Doctrine\ORM\EntityManager services
    orm:
        auto_mapping: true
        mappings:
            -
                name: "DoctrineBehaviors"
                type: annotation
                prefix: 'Knp\DoctrineBehaviors\Tests\Fixtures\Entity\'
                dir: '%kernel.project_dir%/tests/Fixtures/Entity/'
                is_bundle: false
