ninjify/nunjuck

Special tuned version of nette/tester for your PHP projects

v0.1.4 2016-12-20 13:47 UTC

README

Special tuned nette/tester for your PHP projects.

Build Status Downloads total Latest stable Licence

Install

composer require --dev ninjify/nunjuck

Usage

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

There are many predefined test cases.

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

Notes

Little helper to your tests.

use Ninjify\Nunjuck\Notes;

Notes::add('My note');

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

Notes::clear();

Thanks for testing, reporting and contributing.