The HHVM support is most exciting for myself. I've moved production websites and personal projects all over to nginx + HHVM, and I've not run into any issues since the end of last year.
Now, all I want is Facebook's "Hack" language to be formally documented. My personal tests show that the optional gradual H-M typing + HHVM's speed + PHP's benefits === Awesome. PHP has come a long way in the past few years.
[0] http://tester.nette.org/ [1] https://github.com/nette/tester
Part 1: http://www.sitepoint.com/hhvm-hack-part-1/
Part 2: http://www.sitepoint.com/look-hack-php-replacement-hhvm/
Would be great if Facebook would publish more official information.
http://phpunit.de/manual/3.7/en/writing-tests-for-phpunit.ht....
Which is basically turning them into AssertTag calls behind the scenes, which is good as they can be cumbersome to write if not very simple.
The main problem I had with it was the poor error messages it provides on failure (basically "false != true" rather than printing out what it was looking for and what it had found to provide context).
It doesn't look like Nette is going to give any better error messages since it's just passing true or false into a simple Assert.
$this->assertTrue($something, '$something called from WhateverClass returned false')assert($condition);
It's useless.
What happened to all those people proud of PHP's principles? "Shared nothing", remember? Why on earth would your tests share resources and state? This is not Java. It's PHP.
Look at PHP's own tests: PHPT files. They're simple files containing code to setup a test, and the result of a test.
How tests run, well, in a nutshell:
foreach (glob('/tests/*' as $test)) exec('php ' . $test);
Then you check the logs. You can have your little pretty log formatted if you want, but it's not that important:
- If there's stuff in the log, your test failed, you go check why.
- If there's no stuff in the log, you're good to go.
It can catch output, exceptions, even fatal errors. Can PHPUnit catch fatal errors? You need to use its "process isolation features", which is just reinventing the wheel by doing... what I just did in that one-liner above. Well I did it! Process isolation! And I didn't need PHPUnit to do it.
A lot of those "modern PHP" libraries are basically a masochistic exercise in copying designs that make sense in Java into PHP where they make no sense.
PHPT style tests wouldn't make sense in Java. And Java style Unit test frameworks make no sense in PHP.
However all those blindly supporting this, can please continue to waste their time, for the benefit of making sure they're buzzword compliant & in sync with groupthink.
"I write my mocks and fixtures in PHPUnit. Oh yeah it has all the latest assertions, like you can assert XML using CSS selectors". I can almost hear the collective taps on my back just saying this out loud.