Changes in Nette Tester 1.7.0

by Miloslav Hůla 3 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


Changes in Nette Tester 1.5.0

by Miloslav Hůla 4 years ago | Tester

The Nette Tester 1.5.0 has been released last week. It's a small release and here I bring news.

Compatibility with PHP 7 has been improved. Tester works with PHP 7 well and now it supports Throwable interface. So all PHP 7 exceptions are printed and dumped correctly. No more problems are known, if you hit some, open an issue please.

The test runner (vendor/bin/tester) now prints PHP startup errors. It may disclose problem with PHP extensions loading.

read more


Powerful Dependency Injection Container

by David Grudl 4 years ago | Nette

Nette DI (Dependency Injection Container) is one of the most interesting part of Nette Framework. It is compiled, extremely fast and easy to configure.

Let's have an application for sending newsletters. The code is maximally simplified and is available on the GitHub.

We have the object representing email:

class Mail
{
    public $subject;
    public $message;
}

read more


Nette is 3ʳᵈ most popular framework

by David Grudl 4 years ago | Nette

In the survey Best PHP Framework for 2015 organized by the magazine SitePoint Nette takes amazing 3rd place. Thank you for your votes! I am pleased that the users are satisfied with Nette.

It is also interesting how a large number of PHP frameworks are actually used and that there are still many people which don't use any framework.