Skip to content

leberknecht/util-bundle

Repository files navigation

Build Status Coverage Status

Installation

Require the bundle via composer:

composer require "tps/util-bundle":"dev-master"

Or add to composer.json:

"require": {
    [...]
    "tps/util-bundle": "dev-master"
},

Activate in AppKernel.php:

$bundles = [
    [...]
    new Tps\UtilBundle\TpsUtilBundle()
]

Generate unit-tests from service classes

From time to time it happens that a dev looses the strict tests-first pattern and writes a service without a proper test, and later on he wants to add a phpunit-test for this service. Your service probably has some dependencies in the constructor, and now you have to setup mocks for that. To generate a base template for a service test, run the command

app/console tps:util:generate-service-test "Acme\DemoBundle\Service\MyService"

About

Some generic utils for symfony

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •