ptbfw/initializer

2.0.3 2016-09-01 08:16 UTC

README

Compatible with behat v3

SensioLabsInsight

Usage:

default:
    extensions:
      Ptbfw\Initializer\Extension:
            resetters:
                {servicename}:
                    type: {executer type}
                    {executer Options}
                {SecondServiceName}:
                    type: {executer type}
                    {executer Options}

Example behat.yml config:

default:
    extensions:
      Ptbfw\Initializer\Extension:
            resetters:
                test:
                  type: 'Executer'
                  commands:
                    - "ls"
                    - "whoami"
            local_service:
                type: 'mysql'
                host: 'localhost'
                user: 'behat'
                password: '1'
                database: 'behat'
                port: 3306
                <b>directory</b>: 'local'
                init_command: 'SET NAMES "UTF8"'
            local_service_api:
                type: 'mysql'
                host: 'localhost'
                user: 'behat2'
                password: '1'
                database: 'behatTwo'
                <b>directories</b>:
                    - 'local_service_api'
                    - 'local_service'

Types

Mysql

directory(ies) is relative from %features%/bootstrap/database/
If directory start with `/` then path is treated as absolute. If both directory and directories are provided, directory is merged in directories

Executer

ls and whoami are command witch are executed before every scenario. You can use this for apache restart, moving files, clearing cache etc.