Download the PHP package cosma/testing-bundle without Composer

On this page you can find all versions of the php package cosma/testing-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 testing-bundle

Testing Bundle

Circle CI SensioLabsInsight

An extension of h4cc/AliceFixturesBundle , a Symfony2 bundle for flexible usage of nelmio/alice fixtures integrated with very powerful data generator fzaninotto/Faker. This bundle integrates mockery/mockery library, too. The Testing Bundle bundle works with data fixtures in .yml format, detached from the common Doctrine DataFixtures. There are multiple ways of loading fixture files. The Testing Bundle offers loading Fixtures from .yml , dropping and recreating the ORM Schema.

Table of Contents

Installation

Follow the 'dev-master' branch for latest dev version. But i recommend to use more stable version tags if available.

After that, add the h4ccAliceFixturesBundle and TestingBundle to your Kernel, most likely in the "dev" or "test" environment.

Configuration

In case you want to change default paths of fixture directory you can configure the testing bundle's fixture_path. This sets a new relative path to the fixture directory in your bundle.

Generate Test Class

With the command cosma_testing:generate:test you can generate stub Test Classes for classes and traits from a php file.

Test Cases

Supports the following Test Cases:

Simple Test Case

This case is an extension of PHPUnit_Framework_TestCase, with two extra simple methods:

Web Test Case

This case is an extension of Symfony2 WebTestCase - Symfony\Bundle\FrameworkBundle\Test\WebTestCase It has the following methods:

DB Test Case

This case is an extension of Symfony WebTestCase with Database and fixtures support
It has the following methods:

Solr Test Case

This case is an extension of WebTestCase, from current bundle, with extra Solr support It has the following methods:

Elastic Search Test Case

This case is an extension of WebTestCase, from current bundle, with extra ElasticSearch support It has the following methods:

Selenium Test Case

This case is an extension of WebTestCase, with extra Selenium support It has the following methods:

Redis Test Case

This case is an extension of WebTestCase, with extra Redis support It has the following methods:

Composed Test Cases

You can build composed Test Cases using the following defined traits under \Cosma\Bundle\TestingBundle\TestCase\Traits: Supports following test cases:

All composed TestCases can use one or more traits and extends Cosma\Bundle\TestingBundle\TestCase\WebTestCase

Retry Tests

Use the @retry annotation for a Class or Method to retry tests in case of failure. Method annotations are overwriting Class annotation.

Fixtures

Alice fixtures are integrated with Faker.

The most basic functionality of Alice is to turn flat yaml files into objects.

You can define many objects of different classes in one file as such:

Importing/Exporting Fixture Files

You can easily dump Database data to Yaml fixture files with the command cosma_testing:fixtures:dump

You can easily import Yaml fixture to Database with command h4cc_alice_fixtures:load:files

Advanced Usage

Adding own Providers for Faker

A provider for Faker can be any class, that has public methods. These methods can be used in the fixture files for own testdata or even calculations. To register a provider, create a service and tag it.

Example:

Adding own Processors for Alice

A alice processor can be used to manipulate a object before and after persisting. To register a own processor, create a service and tag it.

Example:

Mockery

Mockery is a simple yet flexible PHP mock object framework for use in unit testing

Run Tests

vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist --coverage-text --coverage-html=Tests/coverage Tests

License

The bundle is licensed under MIT.


All versions of testing-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
phpunit/phpunit Version 4.*
doctrine/orm Version ~2.2,>=2.2.3
symfony/framework-bundle Version 2.8.*
h4cc/alice-fixtures-bundle Version 0.5.*
solarium/solarium Version 3.4.*
ruflin/elastica Version 3.*
facebook/webdriver Version 1.1.*
predis/predis Version 1.0.*
mockery/mockery Version 0.9.*
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 cosma/testing-bundle contains the following files

Loading the files please wait ....