PHPackages                             ddelnano/dredd-hooks-php - 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. ddelnano/dredd-hooks-php

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

ddelnano/dredd-hooks-php
========================

PHP hooks for the Dredd testing tool

2.0.0(5y ago)461.2M—4.4%7[7 PRs](https://github.com/ddelnano/dredd-hooks-php/pulls)2MITPHPPHP &gt;=7.2

Since Jul 22Pushed 2y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (26)Used By (2)

PHP Hooks for Dredd API Testing Framework
=========================================

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

[![Build Status](https://camo.githubusercontent.com/c837224b60fb4497ff9740e508766e03cc47298c14c2d38d891d87e11933f1f4/68747470733a2f2f7472617669732d63692e6f72672f6464656c6e616e6f2f64726564642d686f6f6b732d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ddelnano/dredd-hooks-php)![Packagist](https://camo.githubusercontent.com/07bb66cb28aa46649e08c2446a08be61b8830a53b0c659b6b4593cd3ea329ecc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6464656c6e616e6f2f64726564642d686f6f6b732d7068702e7376673f6d61784167653d32353932303030)![Packagist](https://camo.githubusercontent.com/9396b6caa3df5f318b13326e6d0a6b63f83e6b4e46922c3c3837cfefb3a42b23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6464656c6e616e6f2f64726564642d686f6f6b732d7068702e7376673f6d61784167653d32353932303030) ![Packagist](https://camo.githubusercontent.com/a352f4b1a53c7de9d96645c65ee393fd898f466fefdcedd6cac7095ffc3a8801/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6464656c6e616e6f2f64726564642d686f6f6b732d7068702e7376673f6d61784167653d32353932303030) ![license](https://camo.githubusercontent.com/d2e7eb824b108adcb0ec5987c47605f9e99633a82ce09b5288a556d6269c0952/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6464656c6e616e6f2f64726564642d686f6f6b732d7068702e7376673f6d61784167653d32353932303030)

About
-----

[](#about)

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/). Write Dredd hooks in PHP to glue together [API Blueprint](https://apiblueprint.org/) with your PHP project

Not sure what these Dredd Hooks are? Read the Dredd documentation on [them](http://dredd.readthedocs.org/en/latest/hooks/)

The following are a few examples of what hooks can be used for:

- loading db fixtures
- cleanup after test step or steps
- handling authentication and sessions
- passing data between transactions (saving state from responses to stash)
- modifying request generated from blueprint
- changing generated expectations
- setting custom expectations
- debugging via logging stuff

Example

```
