pamil/phpspec-skip-example-extension

Skip your PhpSpec examples through annotations

Maintainers

👁 pamil

Package info

github.com/pamil/PhpSpecSkipExampleExtension

pkg:composer/pamil/phpspec-skip-example-extension

Statistics

Installs: 192 859

Dependents: 0

Suggesters: 0

Stars: 0

v4.2.0 2020-11-24 12:41 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 9b175538737dbf01efe16d930593b39a2c588ebd

  • Gildas Quéméner <gildas.woop@akeneo.com>
  • Nicolas Dupont <nicolas.woop@akeneo.com>
  • Kamil Kokot <kamil.woop@kokot.me>

This package is auto-updated.

Last update: 2026-05-25 00:14:07 UTC


README

This PhpSpec extension allows to skip example through user-friendly annotations. 👁 Build Status

Installation

Once you have installed PhpSpec (following the documentation on the official website), add the extension requirement to your composer.json:

Using phpspec 4.x,

{
 "require": {
 "akeneo/phpspec-skip-example-extension": "^3.0"
 }
}

Using phpspec 5.x,

{
 "require": {
 "akeneo/phpspec-skip-example-extension": "^4.0"
 }
}

And run composer update:

$ php composer.phar update akeneo/phpspec-skip-example-extension

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!