To write more explicit and less wordy tests, atoum provide several asserters who give access to specific assertions related to tested var.
As atoum different asserters are specializations of manipulated items, asserters inherits from asserters they specialize. It help keep consistency between asserters and force to use same assertion names.
This is the asserters inheritance tree:
-- asserter (abstract) |-- error |-- mock |-- stream |-- variable | |-- array | | `-- castToArray | |-- boolean | |-- class | | `-- testedClass | |-- integer | | |-- float | | `-- sizeOf | |-- object | | |-- dateInterval | | |-- dateTime | | | `-- mysqlDateTime | | |-- exception | | `-- iterator | | `-- generator | |-- resource | `-- string | |-- castToString | |-- hash | |-- output | `-- utf8String `-- function
The general asserter/assertion syntaxe is:
Most of the assertions are fluent, as you will see below.
At the end of this chapter you will find several :ref:`tips & tricks<asserter_tips>` related to assertion and asserter, don't forget to read it!