Create a new expectation over an element. The type of the returned expectation
depends on the type of the element passed, and thus, different matchers may be
executed over the expectation.
The generic matchers can be called over any expectation for any element, this include:
toMatch
Note that matchers for string to not check things such as size, if you want that,
we recommend calling expect over the string length and not the whole string.
For the case of arrays, additional to the general ones, the following matchers
are provided, that allow to test things over the elements of the array.
For object, the focus of the matcher is put on the instance type (class it belongs to)
and the properties it contains (attribute keys), extending so with:
Create a new expectation over an element. The type of the returned expectation depends on the type of the element passed, and thus, different matchers may be executed over the expectation. The generic matchers can be called over any expectation for any element, this include:
If the given element is a number, then an NumberExpectation is returned, and so the following additional matchers are added to the previous list:
If a string is used instead, the list is expanded with the following matchers:
For the case of arrays, additional to the general ones, the following matchers are provided, that allow to test things over the elements of the array.
For object, the focus of the matcher is put on the instance type (class it belongs to) and the properties it contains (attribute keys), extending so with: