Website 🚀 contributte.org | Contact 👨🏻‍💻 f3l1x.io | Twitter 🐦 @contributte

# Usage

To install latest version of ninjify/nunjuck use Composer (opens new window).

composer require --dev ninjify/nunjuck
1

# Versions

State Version Branch PHP
dev ^0.5.0 master >= 7.1
stable ^0.4.0 master >= 7.1

# Documentation

# Environment

use Ninjify\Nunjuck\Environment;

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

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


Environment::setupVariables();


Environment::setupGlobalVariables();


Environment::setupRobotLoader();
Environment::setupRobotLoader(function($loader){});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# TestCases

There are many predefined test cases.

  • BaseTestCase
  • BaseMockeryTestCase + TMockeryTestCase
  • BaseMockistaTestCase + TMockistaTestCase
  • BaseContainerTestCase + TContainerTestCase

# 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

Little helper to your tests.

use Ninjify\Nunjuck\Notes;

Notes::add('My note');

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

Notes::clear();
1
2
3
4
5
6
7
8

# Development

See how to contribute (opens new window) to this package. This package is currently maintained by these authors.


Consider to support (opens new window) contributte development team. Also thank you for using this package.