library laravel-behat-traits
Useful traits to use with Behat on Laravel
quiborgue/laravel-behat-traits
Useful traits to use with Behat on Laravel
- Friday, June 19, 2015
- by calimaborges
- Repository
- 2 Watchers
- 0 Stars
- 510 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Laravel Behat Traits
Usage:
Add to composer.json
"require-dev": {
"behat/behat": "3.0.*",
"quiborgue/utils": "dev-master",
"quiborgue/laravel-behat-traits": "dev-master"
},
Edit your FeatureContext
<?php
require_once __DIR__.'/../../bootstrap/autoload.php';
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Quiborgue\LaravelBehatTraits\Traits\LaravelSetup;
use Quiborgue\LaravelBehatTraits\Traits\RestContext;
use Quiborgue\LaravelBehatTraits\Traits\WebContext;
/**
* Defines application features from the specific context.
*/
class FeatureContext implements Context, SnippetAcceptingContext
{
use LaravelSetup;
use RestContext;
use WebContext;
/**
* Initializes context.
*
* Every scenario gets its own context instance.
* You can also pass arbitrary arguments to the
* context constructor through behat.yml.
*/
public function __construct()
{
}
}
Available steps
RestContext | When /^(?:I )?send a ([A-Z]+) request to "([^"]+)"$/
RestContext | When /^(?:I )?send a ([A-Z]+) request to "([^"]+)" with parameters:$/
RestContext | Then the response status should be :code
RestContext | Then the JSON response should be:
RestContext | Then the JSON response should be an array with :count elements
WebContext | Given I am logged in
WebContext | When I visit :uri
WebContext | Then I should see :text
dev-master
9999999-dev
Useful traits to use with Behat on Laravel
Sources
Download
MIT
The Requires
by
Quiborgue
0.1.1
0.1.1.0
Useful traits to use with Behat on Laravel
Sources
Download
MIT
The Requires
by
Quiborgue
0.1.0
0.1.0.0
Useful traits to use with Behat on Laravel
Sources
Download
MIT
The Requires
by
Quiborgue