Mark Mzyk June 16, 2011
In writing unit tests for PHP, I normally use PHPUnit. I frequently use mocks, but forget the params for the getMock call after the first two arguments, as I don’t use the rest frequently. Looking up the method signature through Google is frustratingly difficult, so here it is for future reference. PHPUnit getMock takes a [...]
Programming
- 0 Comments
Mark Mzyk April 20, 2011
At work we have several PHPUnit tests that randomly fail. These ghost failures cause a lot of pain. One run the test fails, the next it passes. These tests are slow poison, as they degrade trust in the system. The code was inspected, but nothing could be found wrong. For some reason, on random test [...]
Programming
- 0 Comments
Mark Mzyk January 17, 2011
I found this information useful while working my way through the Erlang in Practice screencasts. All of these apply in the interactive shell (erl). Find the Erlang version you’re running: erlang:system_info(otp_release). To clear a variable/binding, so it can be used again: f(variable_to_clear). Show all the running erlang processes: erlang:processes(). Find moreĀ useful tips from Joe (such [...]
Languages,Programming
- 0 Comments