graham-campbell/phpspec-skip-example-extension

Skip your PhpSpec examples through annotations

Maintainers

👁 graham-campbell

Package info

github.com/GrahamCampbell/Phpspec-Skip-Example-Extension

pkg:composer/graham-campbell/phpspec-skip-example-extension

Statistics

Installs: 5 898

Dependents: 3

Suggesters: 0

Stars: 1

Open Issues: 0

v5.1.1 2021-10-17 20:25 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Replaces

None

MIT ca43a5191d524a7eaca82af1dd40e970b2c363fd

  • Gildas Quéméner <gildas.woop@akeneo.com>
  • Nicolas Dupont <nicolas.woop@akeneo.com>
  • Kamil Kokot <kamil.woop@kokot.me>
  • Graham Campbell <hello.woop@gjcampbell.co.uk>

README

This Phpspec extension allows to skip example through user-friendly annotations.

Installation

$ composer require "graham-campbell/phpspec-skip-example-extension:^5.1"

Configuration

You can now activate the extension by creating a phpspec.yml file at the root of your project:

extensions:
 Akeneo\SkipExampleExtension: ~

Usage

@require

Skips all the spec example if the class or interface is not available

/**
 * @require Vendor\Builder\ToolInterface
 */
class BridgeBuilderSpec extends ObjectBehavior
{
 // Will be skipped if the Vendor\Builder\ToolInterface interface does not exist
 function it_builds_a_brige()
 {
 }

 // Will be skipped if the Vendor\Builder\ToolInterface interface does not exist
 function it_builds_the_road()
 {
 }

 //...
}

Contributions

Feel free to contribute to this extension if you find some interesting ways to improve it!