Download the PHP package speicher210/functional-test-bundle without Composer

On this page you can find all versions of the php package speicher210/functional-test-bundle. 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 functional-test-bundle

Speicher210 Functional Test Bundle

Introduction

This Bundle provides base classes and functionality for writing and running functional tests with focus on testing REST endpoint. It provides help in setting up test database and loading fixtures and mocking services in DI (even private services).

Installation

Download the Bundle

Enable the Bundle

Symfony

Basic usage

Bootstrap for PHPUnit:

The assertions are done using snapshots for comparison. By default the framework will look under Expected directory (from where the test class is located) for a file with the same name as the test and suffixed with -1.json.

Example of expected output can be: Expected/testReturns200AndUserData-1.json

The -1.jsonsuffix will be incremented for every REST assertion made under one test. In the expected any functionality from coduo/php-matcher can be used.

It is possible to automatically update content of expected files during test execution to the actual content by adding this extension to your phpunit config:

Fixtures are loaded using Doctrine fixtures. By default the framework will look by default under Fixtures directory (from where the test class is located) for a PHP file with the same name as the test. This file must return an array of class names that extend Speicher210\FunctionalTestBundle\Test\Loader\AbstractLoader class. Example of fixture file can be:

In order to rebuild and reset the database you need to create a bootstrap file for PHPUnit. In your own bootstrap file you can include the file Test/bootstrap.php which will reset the test database. The database will not be rebuild for every test, but only once when the tests start. This means that data must be removed before running next test. This can be achieved by running tests in a transaction. For this add the extension to your phpunit config:

Accessing and mocking services

Mocking services can be achieved by using

Services can also be accessed by using


All versions of functional-test-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ~7.2 || ~8.0
ext-json Version *
dama/doctrine-test-bundle Version ^6.0
doctrine/orm Version ^2.7
doctrine/data-fixtures Version ^1.4.1
doctrine/doctrine-fixtures-bundle Version ^3.1
phpunit/phpunit Version ^8.0|^9.0
coduo/php-matcher Version ^5.0 || ^6.0
symfony/browser-kit Version ^4.4 || ^5.1
symfony/css-selector Version ^4.4 || ^5.1
symfony/framework-bundle Version ^4.4 || ^5.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 speicher210/functional-test-bundle contains the following files

Loading the files please wait ....