Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpspec Skip Example Extension Laravel Package

pamil/phpspec-skip-example-extension

PhpSpec extension to skip examples via annotations. Add @require ClassOrInterface to a spec to skip all its examples when that dependency isn’t available—useful for optional integrations and version-dependent code. Compatible with PhpSpec 4 and 5.

View on GitHub
Deep Wiki
Context7

PhpSpec Skip Example Extension

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!

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui