rmiller/behat-spec
Behat extension that integrates with PhpSpec to prevent fatal errors on missing classes or methods. Automatically generates specs and examples when Behat encounters undefined domain objects, then can run phpspec to create the code.
$table, relationships).create(), factory()), which may require manual post-processing.composer require --dev rmiller/behat-spec:^0.5.behat/behat or phpspec/phpspec versions if not pinned.behat.yml and phpspec.yml modifications (low effort, ~15 mins).phpspec run creates class.--non-interactive flag or scripted responses).phpspec run).#[Table('products')]).make:model: Could replace phpspec run for Eloquent models.echo "y" | vendor/bin/behat).--non-interactive support.make:model, make:test, and custom Behat extensions for a more integrated workflow.app/Domain/).HttpTests, FeatureTests).make:model: Can generate Eloquent models from specs.Product, Order).User, Post) unless post-processing is planned.composer require --dev rmiller/behat-spec:^0.5
behat/behat and phpspec/phpspec to specific versions to avoid compatibility issues.behat.yml:
extensions:
RMiller\BehatSpec\Extension\BehatSpecExtension\BehatExtension:
path: vendor/bin/phpspec
config: phpspec.yml
phpspec.yml:
extensions:
RMiller\BehatSpec\Extension\BehatSpecExtension\PhpSpecExtension: ~
rerunner:
path: vendor/bin/phpspec
commands: [describe, exemplify, run]
yes | vendor/bin/behat).--non-interactive support.laravel/framework by isolating Behat/PhpSpec to tests/.Product, Discount).How can I help you explore Laravel packages today?