Download the PHP package tddwizard/magento2-fixtures without Composer

On this page you can find all versions of the php package tddwizard/magento2-fixtures. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-fixtures

TddWizard Fixture library

Latest Version on Packagist Build Status Coverage Status Quality Score Code Climate


Magento 2 Fixtures by Fabian Schmengler

🧙🏻‍♂ https://tddwizard.com/

What is it?

An alternative to the procedural script based fixtures in Magento 2 integration tests.

It aims to be:

Installation

Install it into your Magento 2 project with composer:

composer require --dev tddwizard/magento2-fixtures

Requirements

Usage examples:

Customer

If you need a customer without specific data, this is all:

It uses default sample data and a random email address. If you need the ID or email address in the tests, the CustomerFixture gives you access:

You can configure the builder with attributes:

You can add addresses to the customer:

Or just one:

The CustomerFixture also has a shortcut to create a customer session:

Addresses

Similar to the customer builder you can also configure the address builder with custom attributes:

Product

Product fixtures work similar as customer fixtures:

The SKU is randomly generated and can be accessed through ProductFixture, just as the ID:

Cart/Checkout

To create a quote, use the CartBuilder together with product fixtures:

Checkout is supported for logged in customers. To create an order, you can simulate the checkout as follows, given a customer fixture with default shipping and billing addresses and a product fixture:

It will try to select the default addresses and the first available shipping and payment methods.

You can also select them explicitly:

Order

The OrderBuilder is a shortcut for checkout simulation.

Logged-in customer, products, and cart item quantities will be generated internally unless more control is desired:

Shipment

Orders can be fully or partially shipped, optionally with tracks.

Invoice

Orders can be fully or partially invoiced.

Credit Memo

Credit memos can be created for either all or some of the items ordered. An invoice to refund will be created internally.

Fixture pools

To manage multiple fixtures, fixture pools have been introduced for all entities:

Usage demonstrated with the ProductFixturePool:

Config Fixtures

With the config fixture you can set a configuration value globally, i.e. it will ensure that it is not only set in the default scope but also in all store scopes:

It uses MutableScopeConfigInterface, so the configuration is not persisted in the database. Use @magentoAppIsolation enabled in your test to make sure that changes are reverted in subsequent tests.

You can also set configuration values explicitly for stores with ConfigFixture::setForStore()

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of magento2-fixtures with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
magento/framework Version ^102.0|^103.0
magento/zendframework1 Version ^1.14
magento/module-catalog Version ^103.0|^104.0
magento/module-catalog-inventory Version ^100.3
magento/module-checkout Version ^100.3
magento/module-customer Version ^102.0|^103.0
magento/module-directory Version ^100.3
magento/module-indexer Version ^100.3
magento/module-payment Version ^100.3
magento/module-quote Version ^101.1
magento/module-sales Version ^102.0|^103.0
fakerphp/faker Version ^1.9.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tddwizard/magento2-fixtures contains the following files

Loading the files please wait ....