Nette Tester 2.3.0 is out

by Miloslav Hůla 2 months ago | Tester

New minor version is out and brings mainly fixes. Namely it is a touching support in Tester\FileMock and file locking bypass when Tester\FileMutator is active.

One improvement has been implemented. When running test as an ordinary PHP script, for example:

php tests/my-test.phpt

and test finished sucessfully, there was only an empty screen. Now you get nice green OK, so you can be sure that something happend.

Last thing to mention is a new Assert::nonNull(). It will fail when passed argument is null.

And that's all. See you next time.


Nette Tester 2.2.0 is out

by Miloslav Hůla 7 months ago | Tester

I didn't write blog article about releasing the 2.1.0. The main purpose for that release was to drop support for PHP below 7.1. Nobody complained so it looks like as a good step.

New in Tester

The 2.1.0 version brought one small feature. The --coverage-src parameter is repeatable, so you can mark separated directories for coverage report.

The 2.2.0 version brings few minor fixes and mainly two new features.

read more


Nette Tester 2.0.0 is out

by Miloslav Hůla 2 years ago | Tester

Nette Tester 2 is finally out. I'll describe changes and new features in detail.

Compatibility

New Tester requires PHP in version 5.6 or newer and supports PHP 7.2. Simultaneously, support for HHVM has been dropped. There has been small opinion poll on this topic.

Changes in tests runner

Tester's default interpreter (when called without the -p option) is CLI now. It used to be CGI. You will see notice in console about it.

read more


Changes in Nette Tester 1.7.0

by Miloslav Hůla 4 years ago | Tester

Nette Tester 1.7.0 is out. I'll summarize the changes.

HtmlGenerator, which generates HTML code coverage report, now counts lines from not evaluated files as not covered. The only impact is, that you can see lower percentual coverage in report. Imagine the situation, that you have two source files (same lenght for simplification), but only one of them is loaded by tests. You got 100% coverage before, now you get only 50%.

If you are using TestCase test methods with @dataProvider, data provider method can return Traversable now. As a consequence of this, you can use generator (yield). It is handy for lazy data loading, for example from remote API. Short example:

read more


Changes in Nette Tester 1.6.0

by Miloslav Hůla 4 years ago | Tester

Nette Tester 1.6.0 is out. Let me summarize the changes.

New optional parameter $description has been added to almost all Assert methods. It works as an error message prefix when an assertion fails. It is handy in situations where the error message is not self-describing enough. For example, in a loop with assertion:

foreach ($model->getUsers() as $user) {
    Assert::true($user->isActive(), "User $user->name");
}

read more