2017 © Pedro Peláez
 

library behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

image

bex/behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

  • Friday, January 6, 2017
  • by tkotosz
  • Repository
  • 1 Watchers
  • 12 Stars
  • 24,818 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 15 % Grown

The README.md

Behat-Magento2InitExtension

Scrutinizer Code Quality Build Status, (*1)

Behat-Magento2InitExtension provides access to the magento2 object manager through the BaseFixture class and allows you to change magento config settings temporarly when Behat is running., (*2)

Installation

Install by adding to your composer.json:, (*3)

composer require --dev bex/behat-magento2-init

Configuration

Enable the extension in behat.yml like this:, (*4)

default:
  extensions:
    Bex\Behat\Magento2InitExtension: ~

You can configure the magento bootstrap file location like this:, (*5)

default:
  extensions:
    Bex\Behat\Magento2InitExtension:
      magento_bootstrap_path: /path/to/app/bootstrap.php

You can change magento config settings like this:, (*6)

default:
  extensions:
    Bex\Behat\Magento2InitExtension:
      magento_configs:
        -
          path: 'admin/security/use_form_key'
          value: 0
        -
          path: 'your_module/special_config/awesome_field'
          value: 'somevalue'
          scope_type: 'stores' # allowed values: default, stores, websites; default value: default
          scope_code: 'your_store_code' # the website or store code; default value: null

Usage

When you run behat the extension will - configure the magento2 object manager automatically, so it will be available in all your fixture class which extends the Bex\Behat\Magento2InitExtension\Fixtures\BaseFixture class (see Bex\Behat\Magento2InitExtension\Fixtures\MagentoConfigManager as example). - change the config values before suit and revert the original config values after suit, (*7)

The Versions

06/01 2017

dev-master

9999999-dev https://github.com/tkotosz/behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

  Sources   Download

MIT

The Requires

 

bdd tdd behat magento2

06/01 2017

1.0.4

1.0.4.0 https://github.com/tkotosz/behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

  Sources   Download

MIT

The Requires

 

bdd tdd behat magento2

21/12 2016

dev-feature/reinit-magento-after-config-change

dev-feature/reinit-magento-after-config-change https://github.com/tkotosz/behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

  Sources   Download

MIT

The Requires

 

bdd tdd behat magento2

16/10 2016

1.0.3

1.0.3.0 https://github.com/tkotosz/behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

  Sources   Download

MIT

The Requires

 

bdd tdd behat magento2

23/09 2016

1.0.2

1.0.2.0 https://github.com/tkotosz/behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

  Sources   Download

MIT

The Requires

 

bdd tdd behat magento2

09/09 2016

1.0.1

1.0.1.0 https://github.com/tkotosz/behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

  Sources   Download

MIT

The Requires

 

bdd tdd behat magento2

26/04 2016

1.0.0

1.0.0.0 https://github.com/tkotosz/behat-magento2-init

Provides access to magento2 object manager from behat and allows to change magento config settings temporarly

  Sources   Download

MIT

The Requires

 

The Development Requires

bdd tdd behat magento2