Meet the Nette Tester
Have you ever written following code in PHP?

$obj = new MyClass;
$result = $obj->process($input);
var_dump($result);
So, have you ever dumped a function call result just because to check it by
eye that it returns what it should return? You surely do it many times per day.
In case everything works do you delete this code and do you expect that the
class will not be broken in the future? Murphy's Law guarantees the
opposite
In fact, we wrote the test. And if we didn’t delete it we could run it any time in the future to verify that everything still works as it should. You may create a large amount of these tests over time, so it would be nice if we were able to run them automatically. It would be useful to slightly modify test not to require our inspection, simply to be able to check itself.
And the Nette Tester helps exactly with that. Meet the Nette Tester in the introduction…
Further reading
- Nette Tester 2.4.0 is out
- Interview with Matouš about news in PhpStorm plugins
- Nette Tester 2.3.0 is out
- Nette Tester 2.2.0 is out
- Nette Tester 2.0.0 is out
- Changes in Nette Tester 1.7.0
- Changes in Nette Tester 1.6.0
- Changes in Nette Tester 1.5.0
- Changes in Tester 1.4.0
- Changes in Nette Tester 1.3.1
Comments (RSS)
var_dump() isn't really a test, you usually want to check that some value is present or has some value.
Sign in to submit a comment