PHPackages                             view-components/testing-helpers - 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. view-components/testing-helpers

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

view-components/testing-helpers
===============================

Helpers for view-components testing

v2.0.3(9y ago)11.3k[4 issues](https://github.com/view-components/testing-helpers/issues)7MITPHPPHP ^5.5||^7

Since Feb 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/view-components/testing-helpers)[ Packagist](https://packagist.org/packages/view-components/testing-helpers)[ Docs](https://github.com/view-components/testing-helpers)[ RSS](/packages/view-components-testing-helpers/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (8)Versions (25)Used By (7)

Testing Helpers for ViewComponents
==================================

[](#testing-helpers-for-viewcomponents)

[![Build Status](https://camo.githubusercontent.com/c70c49a9e28b3e648238597b0ce21693f855cde619ba789ba79f50f14dfac30b/68747470733a2f2f7472617669732d63692e6f72672f766965772d636f6d706f6e656e74732f74657374696e672d68656c706572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/view-components/testing-helpers)[![Release](https://camo.githubusercontent.com/27b4ab4af7c9af9900be637588d6d2a0dd6ea039f6a8b97d6bf597e80233cd53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766965772d636f6d706f6e656e74732f74657374696e672d68656c706572732e737667)](https://packagist.org/packages/view-components/testing-helpers)

This repository contains utilities for testing PHP packages of ViewComponents family.

1. Overview
-----------

[](#1-overview)

### 1.1. Web Application

[](#11-web-application)

Package contains simple ready to use web-application based on Silex for components show-case and acceptance tests.

#### 1.1.1. Installation

[](#111-installation)

If your package needs this web-application, add post-install script to composer.json:

```
"scripts": {
        "post-install-cmd": [
            "ViewComponents\\TestingHelpers\\Installer\\Installer::postComposerInstall"
        ]
},
```

Post-install script will allow to configure web-application using command-line interface. If you use `composer install` command with `-no-interaction` option, default settings will be used.

#### 1.1.2. Extending web-application

[](#112-extending-web-application)

Packages that uses view-components/testing helpers can extend this application by adding it's controllers to WEBAPP\_CONTROLLERS environmant variable.

Routing will be automatically generated using [EasyRouting](https://github.com/view-components/testing-helpers/blob/master/src/Application/Http/EasyRouting.php) class.

#### 1.1.3. Running web-application

[](#113-running-web-application)

Package contains [serve command](https://github.com/view-components/testing-helpers/blob/master/serve) that is published to vendor/bin by composer.

Run it from your package folder to start web-server:

```
./vendor/bin/serve
```

On Windows OS it will also open web-application in browser after starting web-server.

### 1.2. Acceptance tests with PhpUnit

[](#12-acceptance-tests-with-phpunit)

#### 1.2.1. Starting &amp; shutting down web-server during tests

[](#121-starting--shutting-down-web-server-during-tests)

Use vendor/view-components/testing-helpers/bootstrap/tests\_bootstrap.php as bootstrap file if you need to implement acceptance tests using PhpUnit.

#### 1.2.2. Abstract acceptance test.

[](#122-abstract-acceptance-test)

Use ViewComponents\\TestingHelpers\\Test\\Acceptance\\AbstractAcceptanceTest as base class for your acceptance tests. It allows to perform http requests using GuzzleHttp package and contains helper methods for assertions.

### 1.3. Fixtures

[](#13-fixtures)

Package provides set of fixtures for testing. It consists of data that is seeded to database during installation and same data in form of php array.

2. Installation
---------------

[](#2-installation)

Testing Helpers can be installed via composer.

**Important**: Do not add `view-components/testing-helpers` to `require` section of composer.json. It must be added to `require-dev` section.

3. License
----------

[](#3-license)

© 2016 Vitalii Stepanenko

Licensed under the MIT License.

Please see [License File](LICENSE) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~5 days

Recently: every ~20 days

Total

24

Last Release

3611d ago

Major Versions

v1.11.0 → v2.0.02016-04-07

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v1.2.1PHP ^5.5||^7

### Community

Maintainers

![](https://www.gravatar.com/avatar/f774898eb3341eff33d07e1b05bccfb69d084831b7ac151d3079e322d0ff6155?d=identicon)[nayjest](/maintainers/nayjest)

---

Top Contributors

[![Nayjest](https://avatars.githubusercontent.com/u/153999?v=4)](https://github.com/Nayjest "Nayjest (80 commits)")

---

Tags

testingphpunittestacceptance-testingtestsacceptance tests

### Embed Badge

![Health badge](/badges/view-components-testing-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/view-components-testing-helpers/health.svg)](https://phpackages.com/packages/view-components-testing-helpers)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[ta-tikoma/phpunit-architecture-test

Methods for testing application architecture

10745.9M13](/packages/ta-tikoma-phpunit-architecture-test)[php-mock/php-mock-phpunit

Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.

1718.2M399](/packages/php-mock-php-mock-phpunit)[fr3d/swagger-assertions

Test your API requests and responses against your swagger definition

138850.9k5](/packages/fr3d-swagger-assertions)[code-distortion/adapt

A Laravel package that builds databases for your tests, improving their speed.

2835.5k](/packages/code-distortion-adapt)

PHPackages © 2026

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