PHPackages                             netsells/dredd-hooks-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. netsells/dredd-hooks-laravel

AbandonedArchivedPackage[Testing &amp; Quality](/categories/testing)

netsells/dredd-hooks-laravel
============================

Laravel hooks for the Dredd testing tool

1.1.0(6y ago)413.4k↓50%3[1 PRs](https://github.com/netsells/dredd-hooks-laravel/pulls)MITPHPPHP &gt;=7.1

Since Jan 8Pushed 4y agoCompare

[ Source](https://github.com/netsells/dredd-hooks-laravel)[ Packagist](https://packagist.org/packages/netsells/dredd-hooks-laravel)[ RSS](/packages/netsells-dredd-hooks-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Laravel Hooks for Dredd API Testing Framework
=============================================

[](#laravel-hooks-for-dredd-api-testing-framework)

[![Packagist](https://camo.githubusercontent.com/ae79303d784c45650fdcd1315e81221d5f2daa03ed92e6475100f39e1887b39f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e657473656c6c732f64726564642d686f6f6b732d6c61726176656c2e737667)](https://packagist.org/packages/netsells/dredd-hooks-laravel)[![Packagist](https://camo.githubusercontent.com/d39ce0552cbc7736ac6e7483abe050d35ead9fdf7446ceb57618e3a7d631488d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e657473656c6c732f64726564642d686f6f6b732d6c61726176656c2e737667)](https://packagist.org/packages/netsells/dredd-hooks-laravel)![license](https://camo.githubusercontent.com/309673b3abf7617b0e0b13e056c005b6669a98ad68d9677013f3ed3465eb02b1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e657473656c6c732f64726564642d686f6f6b732d6c61726176656c2e737667)

This package contains a PHP Dredd hook handler which provides a bridge between the [Dredd API Testing Framework](http://dredd.readthedocs.org/en/latest/)and PHP environment to ease implementation of testing hooks provided by [Dredd](http://dredd.readthedocs.org/en/latest/). Most of the heavy lifting is provided by the [ddelnano/dredd-hooks-php](https://github.com/ddelnano/dredd-hooks-php) package.

It is created and maintained by the [Netsells team](https://netsells.co.uk/)

Installation
------------

[](#installation)

### Composer

[](#composer)

Laravel Hooks for Dredd should be installed via composer, we recommend you put this in your require-dev section.

```
composer require netsells/dredd-hooks-laravel --dev
```

### Dredd Setup

[](#dredd-setup)

In order to inject environment variables and use the full power of Larvel Dredd Hooks, you need to add the following to your `dredd.yml` file (or put in your console arguments).

```
# This can be any single file which extends Netsells\Dredd\Kernel
hookfiles: 'tests/dredd/Kernel.php'

language: 'vendor/bin/dredd-hooks-laravel'
server: 'php -S 127.0.0.1:3000 ./vendor/netsells/dredd-hooks-laravel/server.php -t public/'
endpoint: 'http://127.0.0.1:3000'
```

Usage
-----

[](#usage)

The package requires you to make a single file (named in the `hookfiles` part of dredd.yml above). This should have at least the `handle` method.

```
