2017 © Pedro Peláez
 

library test-tools

Web-IT Test tools

image

webit/test-tools

Web-IT Test tools

  • Tuesday, February 6, 2018
  • by dbojdo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 128 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

test-tools

Unit / Behaviour test tools, (*1)

Standalone Symfony Bundle Configuration testing

Create your AppKernel:, (*2)

use Webit\Tests\Behaviour\Bundle\Kernel as BaseKernel;

class AppKernel extends BaseKernel
{
    public function registerBundles()
    {
        return array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new My\BrandNewBundle();
        ); // array of your Bundles
    }
}

Create your FeatureContext and register the Kernel:, (*3)

use Webit\Tests\Behaviour\Bundle\BundleConfigurationContext;

class FeatureContext extends BundleConfigurationContext
{
    public function __construct()
    {
        parent::__construct(new AppKernel());
    }
}

Scenario example:, (*4)

Feature: MyBrandNewBundle configuration feature
  In order to set up MyBrandNew library with Symfony Application
  As a developer
  I need Bundle Configuration / Extension

  Background:
    Given the configuration contains:
    """
    framework:
        secret: "my-secret-hash"

    my_brand_new: ~
    """

  Scenario: Basic configuration
    When I bootstrap the application
    Then there should be following services defined:
    """
    my_service_one, my_service_two, my_service_three
    """
    And there should be following aliases defined:
    | service                    | alias              |
    | my_service.default_service | my_service.service |
    And all given services should be reachable

Create as many scenarios as you need (for different configuration options). Feel free to add any other checks (steps) into your Context., (*5)

The Versions

06/02 2018

0.9.x-dev

0.9.9999999.9999999-dev http://www.web-it.eu

Web-IT Test tools

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

testing unit test web-it behaviour test

04/02 2018

dev-master

9999999-dev http://www.web-it.eu

Web-IT Test tools

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

testing unit test web-it behaviour test

07/01 2016

0.1.0

0.1.0.0 http://www.web-it.eu

Web-IT Test tools

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

testing unit test web-it behaviour test