Download the PHP package turanct/omikron without Composer
On this page you can find all versions of the php package turanct/omikron. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download turanct/omikron
More information about turanct/omikron
Files in turanct/omikron
Package omikron
Short Description Simple, functional programming style test framework
License MIT
Homepage http://github.com/turanct/omikron
Informations about the package omikron
Omikron Test Framework
A simple, functional programming inspired, test framework.
This project was started as a reaction to this issue and was initially a gist. It's currently not meant to be used in production, but there's nobody stopping you if you want to.
Usage
Installing it is easy, just require turanct/omikron
as a development dependency in your composer.json
file, and configure a bin-dir
. The omikron executable will be available in your bin directory when you've run composer install
.
Omikron has a concept of topics, topics are distinct parts of your code under test. These topics have different features, and to describe those features, there are assertions.
This is an example of a topic. It's in a file named topics/topic-calculus.php
. Every topic file must have a name starting with topic-
. You can split topics over multiple files if you want to. The topic calculus
has two features, addition
and subtraction
, and both of those features have some assertions.
To run the tests for this topic, we'll just run bin/omikron topics
(as topics
is the directory with my topics). The output will be something like this:
Tests
Omikron has unit tests, located in the tests
directory. These tests are written using Omikron itself, so you can just run the Omikron executable on the tests dir!
Contributing
Feel free to fork and send pull requests!