Componette

Componette

ninjify

ninjify / nunjuck v0.3.0

Special tuned version of @nette tester called nunjuck!

download-cloud-line composer require ninjify/nunjuck

Website ๐Ÿš€ contributte.org | Contact ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป f3l1x.io | Twitter ๐Ÿฆ @contributte

Usage

To install latest version of ninjify/nunjuck use Composer.

composer require --dev ninjify/nunjuck

Versions

State Version Branch PHP
dev ^0.3.0 master >= 7.1
stable ^0.2.1 master >= 7.1

Documentation

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

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();

Development

See how to contribute to this package. This package is currently maintained by these authors.


Consider to support contributte development team. Also thank you for using this package.

  • v0.3.0 v0.3.0

    Bump! ๐Ÿ‘ฆ

    Diff: v0.2.1...v0.3.0

    Changes:

    • Upgrade nette/tester to 2.3.0
    • Codestyle
    • Tune readme
  • v0.2.1 v0.2.1

    Bump! ๐Ÿ˜จ

    Diff: v0.2...v0.2.1

    Changes:

    • require PHP >= 7.1 [#4]
    • use nette/tester 2.1.0 [#4]
    • fix robot loader [#3]
    • better CI [#4]
  • v0.2 v0.2

    Bump! ๐Ÿญ

    Diff: v0.1.4...v0.2

    Changes:

    • added Toolkit class [#1]
    • upgrade to nette/tester v2.0.0 [#2]
  • v0.1.4 v1.1.4

    Bump! ๐Ÿ‡ป๐Ÿ‡บ

    Diff: v0.1.3...v0.1.4

    Changes:

    • code sniffer improvements
    • added useful functions: mocki, mockis, mockisr & test
  • v0.1.3 v0.1.3

    Bump! ๐Ÿท

    Diff: v0.1.2...v0.1.3

    Changes:

    • many Environment improvements
  • v0.1.2 v0.1.2

    Bump! ๐Ÿ•น

    Diff: v0.1.1...v0.1.2

    Changes:

    • fix PSR4
  • v0.1.1 v0.1.1

    Bump! ๐Ÿ‘ถ

    Diff: v0.1...v0.1.1

    Changes:

    • colored output
  • v0.1 v0.1

    Bumped! ๐Ÿ‘Š

bar-chart-fill

Statistics

download-cloud-fill
217787
star-fill
3
bug-fill
0
flashlight-fill
137d
price-tag-2-line

Badges

guide-fill

Dependencies

php (>=7.1)
Componette Componette felix@nette.org