PHPackages                             ninjify/nunjuck - 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. ninjify/nunjuck

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

ninjify/nunjuck
===============

Special tuned version of nette/tester for your PHP projects

v0.4.1(1y ago)4425.1k↑20.8%220MITPHPPHP &gt;=7.2

Since Dec 12Pushed 1y ago2 watchersCompare

[ Source](https://github.com/ninjify/nunjuck)[ Packagist](https://packagist.org/packages/ninjify/nunjuck)[ Docs](https://github.com/ninjify/nunjuck)[ RSS](/packages/ninjify-nunjuck/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (11)Used By (20)

[![](https://camo.githubusercontent.com/23461c5db50a316db8b3720fe02198b59ac4cbf3c90ffeac5b1f668730172d4a/68747470733a2f2f686561746261646765722e6e6f772e73682f6769746875622f726561646d652f6e696e6a6966792f6e756e6a75636b2f)](https://camo.githubusercontent.com/23461c5db50a316db8b3720fe02198b59ac4cbf3c90ffeac5b1f668730172d4a/68747470733a2f2f686561746261646765722e6e6f772e73682f6769746875622f726561646d652f6e696e6a6966792f6e756e6a75636b2f)

 [![](https://camo.githubusercontent.com/86d200d27dc324588037ebaf11891271c01686259e2802ee5384213ad54c6b22/68747470733a2f2f62616467656e2e6e65742f6769746875622f636865636b732f6e696e6a6966792f6e756e6a75636b2f6d61737465723f63616368653d333030)](https://github.com/ninjify/nunjuck/actions) [![](https://camo.githubusercontent.com/47a5b7386fffc9808e69960033f792ecaddb01422f409dbd919eadc5ed524c15/68747470733a2f2f62616467656e2e6e65742f636f766572616c6c732f632f6769746875622f6e696e6a6966792f6e756e6a75636b3f63616368653d333030)](https://coveralls.io/r/ninjify/nunjuck) [![](https://camo.githubusercontent.com/d93912b643c22fac5201bc8a5d3acc32042851b019be9a51638e882b238bdc7c/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f646d2f6e696e6a6966792f6e756e6a75636b)](https://packagist.org/packages/ninjify/nunjuck) [![](https://camo.githubusercontent.com/17819285f242c6413547d97fb7d11270e0ed513a20f9fbc9ef00fe3f48eec266/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f6e696e6a6966792f6e756e6a75636b)](https://packagist.org/packages/ninjify/nunjuck)

 [![](https://camo.githubusercontent.com/0276c0b5267283ca586e779b2e2e6e0a7dcf64cf24e9c3a31ceef8d4955d8380/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f6e696e6a6966792f6e756e6a75636b)](https://packagist.org/packages/ninjify/nunjuck) [![](https://camo.githubusercontent.com/1e472ca5f0490b3fbde42050d5d25cff875b2b8b3d63b786c8fcde7eb720847d/68747470733a2f2f62616467656e2e6e65742f6769746875622f6c6963656e73652f6e696e6a6966792f6e756e6a75636b)](https://github.com/ninjify/nunjuck) [![](https://camo.githubusercontent.com/a8b1cd856d7d396fdebbe46947cc3507490acc267a02361e5e53bb7b820c95c3/68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f6769747465722f6379616e)](https://bit.ly/ctteg) [![](https://camo.githubusercontent.com/86d6416fc04f8bcc3daa7bf881526b9953b9726b1164d05c157c8713e3a73418/68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f666f72756d2f79656c6c6f77)](https://bit.ly/cttfo) [![](https://camo.githubusercontent.com/5d170ab94e6d594609561e16fe0f9e4293968fbd4dfcfafc5e11efc1415ef09c/68747470733a2f2f62616467656e2e6e65742f62616467652f73706f6e736f722f646f6e6174696f6e732f463936383534)](https://contributte.org/partners.html)

Website 🚀 [contributte.org](https://contributte.org) | Contact 👨🏻‍💻 [f3l1x.io](https://f3l1x.io) | Twitter 🐦 [@contributte](https://twitter.com/contributte)

Usage
-----

[](#usage)

To install latest version of `ninjify/nunjuck` use [Composer](https://getcomposer.com).

```
composer require --dev ninjify/nunjuck

```

Versions
--------

[](#versions)

StateVersionBranchPHPdev`^0.5.0``master``>= 7.1`stable`^0.4.0``master``>= 7.1`Documentation
-------------

[](#documentation)

### Environment

[](#environment)

```
use Ninjify\Nunjuck\Environment;

# Configure Nette\Tester
Environment::setupTester();

# Configure timezone (Europe/Prague by default)
Environment::setupTimezone();

# Configure many constants
Environment::setupVariables();

# Fill global variables
Environment::setupGlobalVariables();

# Register robot loader
Environment::setupRobotLoader();
Environment::setupRobotLoader(function($loader){});
```

### TestCases

[](#testcases)

There are many predefined test cases.

- `BaseTestCase`
- `BaseMockeryTestCase` + `TMockeryTestCase`
- `BaseMockistaTestCase` + `TMockistaTestCase`
- `BaseContainerTestCase` + `TContainerTestCase`

### Toolkit

[](#toolkit)

`Toolkit` is class for handling anonymous tests functions.

- `Toolkit::setUp(function() { ... })` is called before test function.
- `Toolkit::tearDown(function() { ... })` is after before test function.
- `Toolkit::bind($object)` binds new context into test function, you can access `$this->` inside.
- `Toolkit::test(function() { ... })` triggers test function.

### Notes

[](#notes)

Little helper to your tests.

```
use Ninjify\Nunjuck\Notes;

Notes::add('My note');

# ['My note']
$notes = Notes::fetch();

Notes::clear();
```

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

[](#development)

See [how to contribute](https://contributte.org) to this package. This package is currently maintained by these authors.

[ ![](https://avatars2.githubusercontent.com/u/538058?v=3&s=80)](https://github.com/f3l1x)---

Consider to [support](https://contributte.org/partners.html) **contributte** development team. Also thank you for using this package.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance45

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community32

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83% 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 ~335 days

Recently: every ~690 days

Total

10

Last Release

427d ago

PHP version history (3 changes)v0.1PHP &gt;=5.6

v0.2.1PHP &gt;=7.1

v0.4.0PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/538058?v=4)[Milan Šulc](/maintainers/f3l1x)[@f3l1x](https://github.com/f3l1x)

---

Top Contributors

[![f3l1x](https://avatars.githubusercontent.com/u/538058?v=4)](https://github.com/f3l1x "f3l1x (39 commits)")[![petrparolek](https://avatars.githubusercontent.com/u/6066243?v=4)](https://github.com/petrparolek "petrparolek (3 commits)")[![mabar](https://avatars.githubusercontent.com/u/20974277?v=4)](https://github.com/mabar "mabar (2 commits)")[![Roman3349](https://avatars.githubusercontent.com/u/4655467?v=4)](https://github.com/Roman3349 "Roman3349 (2 commits)")[![radimvaculik](https://avatars.githubusercontent.com/u/461164?v=4)](https://github.com/radimvaculik "radimvaculik (1 commits)")

---

Tags

ninjifynunjuckphptestertestingphpnettetester

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ninjify-nunjuck/health.svg)

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

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[letsdrink/ouzo-goodies

Utility classes, test assertions and mocking framework extracted from Ouzo framework.

132617.9k7](/packages/letsdrink-ouzo-goodies)[quizlet/hammock

Hammock is a stand-alone mocking library for Hacklang.

27445.5k](/packages/quizlet-hammock)[doppiogancio/mocked-client

A simple way to mock a client

2174.9k3](/packages/doppiogancio-mocked-client)[phrozenbyte/phpunit-array-asserts

Provides various array-related PHPUnit assertions, primarily used for API testing.

1055.0k1](/packages/phrozenbyte-phpunit-array-asserts)[yegor256/phprack

Light framework for automation of integration tests

254.7k](/packages/yegor256-phprack)

PHPackages © 2026

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