Live data from Hacker News

PHPUnit 4.0 Released

github.com

1–10 of 16 posts

Re: PHPUnit 4.0 Released

#2
This is pretty exciting for me. At least, it would be (it seems like a drop in replacement, as the backwards compat breaking changes are really rarely used in production IME) -- except I've moved to `nette/tester' [0][1]. It's much much lighter (in features as well as run-time) but the trade-off is a seriously nice API, that includes even a nice DOM tester for integration work.

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

Re: PHPUnit 4.0 Released

#3
post #2

This is pretty exciting for me. At least, it would be (it seems like a drop in replacement, as the backwards compat breaking changes are really rarely used in production IME) -- except I've moved to `nette/tester' [0][1]. It's much much lighter (in features as well as run-time) but the trade-off is a seriously nice API, that includes even a nice DOM tester for integration work. The HHVM support is most exciting for m…

PHPUnit has assertions for matching against CSS selectors, assertSelectCount and friends.

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.

Re: PHPUnit 4.0 Released

#4
post #2

This is pretty exciting for me. At least, it would be (it seems like a drop in replacement, as the backwards compat breaking changes are really rarely used in production IME) -- except I've moved to `nette/tester' [0][1]. It's much much lighter (in features as well as run-time) but the trade-off is a seriously nice API, that includes even a nice DOM tester for integration work. The HHVM support is most exciting for m…

The best introduction about Facebook's "Hack" language I found:

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.

Re: PHPUnit 4.0 Released

#5
post #4
post #2

This is pretty exciting for me. At least, it would be (it seems like a drop in replacement, as the backwards compat breaking changes are really rarely used in production IME) -- except I've moved to `nette/tester' [0][1]. It's much much lighter (in features as well as run-time) but the trade-off is a seriously nice API, that includes even a nice DOM tester for integration work. The HHVM support is most exciting for m…

The best introduction about Facebook's "Hack" language I found: 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.

I went to an SFPHP meetup the other day. Sounds like it's coming very soon.

Re: PHPUnit 4.0 Released

#6
post #2

This is pretty exciting for me. At least, it would be (it seems like a drop in replacement, as the backwards compat breaking changes are really rarely used in production IME) -- except I've moved to `nette/tester' [0][1]. It's much much lighter (in features as well as run-time) but the trade-off is a seriously nice API, that includes even a nice DOM tester for integration work. The HHVM support is most exciting for m…

Thanks for this, I soon want to migrate our companies production stuff to HHVM but I'm scared :(

Re: PHPUnit 4.0 Released

#9
post #7

My litmus test about a package is can I reduce it to one line of code, for 80% of the benefits. If yes, it's useless. assert($condition); It's useless.

Great, now when a test fails, your resources are left in an inconsistent state. How do you deal with that?

Re: PHPUnit 4.0 Released

#10
post #2

This is pretty exciting for me. At least, it would be (it seems like a drop in replacement, as the backwards compat breaking changes are really rarely used in production IME) -- except I've moved to `nette/tester' [0][1]. It's much much lighter (in features as well as run-time) but the trade-off is a seriously nice API, that includes even a nice DOM tester for integration work. The HHVM support is most exciting for m…

PHPUnit has assertions for matching against CSS selectors, assertSelectCount and friends. 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 pr…

You're supposed to provide the context message yourself if necessary, I don't think PHP has the capabilities to do this automatically for you anyway. PHPUnit makes this really easy.

    $this->assertTrue($something, '$something called from WhateverClass returned false')
Post reply on HN