PHPackages                             developerhub/php-testcase - 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. developerhub/php-testcase

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

developerhub/php-testcase
=========================

PHPUnit testing tool for PHP

v1.1.0(13y ago)027PHP

Since Aug 3Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/Lawondyss/PHPTestCase)[ Packagist](https://packagist.org/packages/developerhub/php-testcase)[ RSS](/packages/developerhub-php-testcase/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (5)Used By (0)

Vytvořeno v { DeveloperHub

PHPTestCase
===========

[](#phptestcase)

- sada nastroju pro testovani aplikaci v PHP
- doporucuji PHPTestCase pouzit jako submodul

Instalace PHPTestCase
---------------------

[](#instalace-phptestcase)

- naklonovani externiho repozitare $ git submodule add  libs/PHPTestCase
- v rootu projektu se vytvori sobor .gitmodules, ktery predstavuje konfiguracni soubor, v nemz je ulozeno mapovani mezi adresou URL projektu a lokalnim podadresarem PHPTestCase
- hostujici projekt je nyni povysen na "super projekt"
- pri klonovani je sice ziskan .gitmodules, ale ne jeho data, je potreba je stahnout
    - $ git submodule init = inicializace lokalniho konfiguracniho souboru
    - $ git submodule update = vyzvednuti vsech dat
- ve skeletonu v adresarich unit a selen jsou v souborech readme pripraveny ukazkove tridy testu

Nastaveni
=========

[](#nastaveni)

- obsah adresare skeleton/ prekopirujte do rootu Vasi aplikace
- ziskate
    - phpunit.xml - konfigurace phpunit
    - tests/
        - case/
            - selen/ - adresar pro selen testy
            - unit/ - adresar pro integracni a jednotkove testy
        - coverage/ - adresar pro coverage report
        - libs/ - adresar pro tridy tretich stran, nebo jejich uzpusobeni, nebo Vase, ktere vyuzijete jen v testech
        - run.php - spoustec NetteTestCase a PHPUnit frameworku

Spousteni integracnich a jednotkovych testu
===========================================

[](#spousteni-integracnich-a-jednotkovych-testu)

- $ php tests/run.php
    - bez parametru se spusti vsechny testy
    - s parametrem --group unit pouze unit testy
- pokud pouzivate pre-commit, automaticky se spousteji testy pouze ve skupine unit

Spousteni testu pred provedenim prikazu git commit
==================================================

[](#spousteni-testu-pred-provedenim-prikazu-git-commit)

- prekopirujte z libs/PHPTestCase/framework/Hooks/pre-commit do .git/hooks/
- muzete nsatavit urcitou skupinu testu, ktera se ma spoustet pri commitu
- muzete nastavit cestu k PHP
- git commit
    - spusti PHPUnit na testech
    - pri uspesnem probehnuti testu se provede git commit
    - pri neuspesnem probehnuti testu se git commit neprovede

Poznamky k nastaveni phpunit.xml
================================

[](#poznamky-k-nastaveni-phpunitxml)

- listeners
    - Application\_Test\_TestTimeListener - po odkomentovani hlida max. 2s delku behu jednoho testu

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance40

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 56.5% 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

Unknown

Total

1

Last Release

5035d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f642f8a219fdaad6b73c302bfc3a623148b8eefd58ea4078cdfae1f24c47fc5?d=identicon)[Lawondyss](/maintainers/Lawondyss)

---

Top Contributors

[![rdpanek](https://avatars.githubusercontent.com/u/230124?v=4)](https://github.com/rdpanek "rdpanek (13 commits)")[![Lawondyss](https://avatars.githubusercontent.com/u/272130?v=4)](https://github.com/Lawondyss "Lawondyss (8 commits)")[![ondrejklejch](https://avatars.githubusercontent.com/u/609191?v=4)](https://github.com/ondrejklejch "ondrejklejch (2 commits)")

### Embed Badge

![Health badge](/badges/developerhub-php-testcase/health.svg)

```
[![Health](https://phpackages.com/badges/developerhub-php-testcase/health.svg)](https://phpackages.com/packages/developerhub-php-testcase)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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