Open menu icon N-ARY CIRCLED PLUS OPERATOR
atoum

atoum


atoum is a simple, modern and intuitive unit testing framework for PHP! It is completely standalone, everything is available and works out of the box.

Leverage the power of asserters

The asserters will make you tests easy to read and simplify your test. Also, more things will be tested with less code because asserter will also test things like types.

<?php
$this
  ->string("hello world")
      ->endWith("world")
      ->hasLength(11)
  ->array([1, 2, 3])
      ->hasSize(3)
;

A fast engine you can count on

Tests isolation and parallelization to get better performances and avoid side-effects on tests. Unit tests need to be fast.

Create mocks without headache

Easy to use, and with a lot of features, atoum mocks will make you not hesitate to write mocks, so your tests will be more decoupled and easier to maintain.
<?php
$mockDbClient = new \mock\Database\Client();

// Redefine the method connect
// it will always return true
$this->calling($mockDbClient)->connect = true;

// Redefine the method select
// it will execute the given anonymous function
$this->calling($mockDbClient)->select = function() {
  return array();
};

Integrated with all the PHP ecosystem

From your prefered IDE to the lastest SAAS tool, you can find an integration with atoum.

A lot a additionnal features via extentions

Test JSON or XML, use a BDD-like syntax, and so much more. atoum has a vast ecosystem of extensions to extend the already rich functionnalities of this test framework. View all extensions

What's next ?

atoum has many more features, here are the next steps to try it or read more about it: