Download the PHP package draw/tester-bundle without Composer

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

Draw Tester Bundle

This bundle integrate the Draw Tester Component.

It also provides test helpers to make it easier to test your Symfony application.

Kernel Testing

When configuring your kernel you may want to test that everything is hooked up correctly.

There is the list of service, event dispatcher, command etc.

There is some TestCase/Trait to help you do that (work in progress).

Event Dispatcher

Relying on the debug:event-dispatcher command we can dump the list of event listeners and validated it against the expected list.

The first time you run this test it will fail and dump the current configuration in the event_dispatcher.xml file.

Commit this file, next time your rune this test you will be able to validate that the configuration is still valid.

If you change the listener in your code or change your dependencies you can run the test again and see the diff.

This will allow you to see if some external listeners changed at the same time.

PHPUnit Extension

This bundle also provide a PHPUnit extension to make it easier to test your Symfony application.

KernelShutdown

Sometimes you need to use the kernel/container in a tearDownAfterClass method.

Since symfony shutdown the kernel in the tearDown method, this will boot a new kernel cause a kernel to be up.

Adding the KernelShutdownExtension will make sure the kernel is shutdown after the test.

SetUpAutowire addon

The draw/tester component provide a way to autowire property in your test.

This bundle provide some custom Autowire attribute that can use in the context of a Symfony test cases.

Make sure to register is in your phpunit configuration file. as explained in the draw/tester documentation.

Here is an example of attribute you can use in your test case:

If you extend from a WebTestCase you can also use the AutowireClient attribute to get a client.

By using the AutowireClient in conjunction with the AutowireService you are use that the client is created before the other service preventing the exception:

Booting the kernel before calling "Symfony\Bundle\FrameworkBundle\Test\WebTestCase::createClient" is not supported, the kernel should only be booted once

This is the same client as the one you get from the WebTestCase, you can use it the same way.

Note that the AutowireClient attribute have an options and server parameters like you would do when calling the createClient method.

DoctrineTransaction

Base on dama/doctrine-test-bundle this extension will start a transaction before each test class and rollback it after the test.

By using test class instead of test method, like the original bundle does, it will ease dependencies managements.

Make sure to configure this extension first in your phpunit configuration file.

Also if one of your test should not have transaction you can use the NoTransaction attribute on the test class.


All versions of tester-bundle with dependencies

PHP Build Version
Package Version
Requires ext-dom Version *
draw/core Version ^0.14
draw/tester Version ^0.14
symfony/browser-kit Version ^6.4.0
symfony/deprecation-contracts Version ^3.5.0
symfony/framework-bundle Version ^6.4.0
symfony/http-foundation Version ^6.4.0
symfony/validator Version ^6.4.0
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 draw/tester-bundle contains the following files

Loading the files please wait ....