PHPackages                             phramework/testphase - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. phramework/testphase

ActiveLibrary[HTTP &amp; Networking](/categories/http)

phramework/testphase
====================

API testing environment build for phramework and RESTful APIs

1.5.0(9y ago)314.0k[24 issues](https://github.com/phramework/testphase/issues)1Apache-2.0PHPPHP &gt;=5.6

Since Nov 22Pushed 9y ago3 watchersCompare

[ Source](https://github.com/phramework/testphase)[ Packagist](https://packagist.org/packages/phramework/testphase)[ Docs](https://phramework.github.io/)[ RSS](/packages/phramework-testphase/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (8)Versions (20)Used By (1)

testphase
=========

[](#testphase)

API testing environment build for phramework and RESTful APIs

[![Coverage Status](https://camo.githubusercontent.com/ae4c1b6abb5c55830bf51fe989fc0d2a408b19b8c2b1c1317da4d55b40f669e2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f706872616d65776f726b2f7465737470686173652f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/phramework/testphase?branch=master) [![Build Status](https://camo.githubusercontent.com/cb37130975c438a8c203edb2e6c79c8d531017115881719538ebfccbfb8ccaa1/68747470733a2f2f7472617669732d63692e6f72672f706872616d65776f726b2f7465737470686173652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phramework/testphase)[![StyleCI](https://camo.githubusercontent.com/9704d2d93ef7d3f392482e5e0b9d47ba2f3ead04943ac8b31a347c6e65f47376/68747470733a2f2f7374796c6563692e696f2f7265706f732f34363637383738342f736869656c64)](https://styleci.io/repos/46678784)

Usage
-----

[](#usage)

Require package using composer

```
composer require phramework/testphase
```

### Execute tests written in JSON files using command line

[](#execute-tests-written-in-json-files-using-command-line)

```
./vendon/bin/testphase help -b ./bootstrap.php -d ./tests-directory/

```

Inside your `bootstrap.php` file you MAY use the `Testphase::setBase` method to set the base url of your API. For example: `Testphase::setBase('http://localhost/myapp/api/');`

### Execute tests in PHP scripts

[](#execute-tests-in-php-scripts)

```
$test = (new Testphase(
    'posts/notFound',
    'GET',
    [
        'Accept: application/json'
    ]
))
->expectStatusCode(404)
->expectJSON()
->run();
```

Development
-----------

[](#development)

### Install

[](#install)

```
composer update
```

### Lint and test code

[](#lint-and-test-code)

```
composer lint
composer test
```

Testing relies on [JSONPlaceholder](http://jsonplaceholder.typicode.com/) service.

### Generate documentation

[](#generate-documentation)

```
composer doc
```

License
-------

[](#license)

Copyright 2015 - 2016 Xenofon Spafaridis

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

```
http://www.apache.org/licenses/LICENSE-2.0

```

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 99.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~86 days

Total

16

Last Release

3392d ago

Major Versions

0.0.1-RC1 → 1.0.02016-01-19

1.5.0 → 3.x-dev2017-01-29

PHP version history (2 changes)0.0.0PHP &gt;=5.6

3.x-devPHP &gt;=7

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/432379?v=4)[Xenofon Spafaridis](/maintainers/nohponex)[@nohponex](https://github.com/nohponex)

---

Top Contributors

[![nohponex](https://avatars.githubusercontent.com/u/432379?v=4)](https://github.com/nohponex "nohponex (119 commits)")[![VManolas](https://avatars.githubusercontent.com/u/8604736?v=4)](https://github.com/VManolas "VManolas (1 commits)")

---

Tags

http-clientrestful-apitesting-tools

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/phramework-testphase/health.svg)

```
[![Health](https://phpackages.com/badges/phramework-testphase/health.svg)](https://phpackages.com/packages/phramework-testphase)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
