A little upset that the term "spy" was not used to describe testing something that we are just checking is called with a value (really does not matter if you control it's return IMO). Proxy seemed like, an interesting prefix or suffix to "spy" to talk about, or by convention denote "this is real output" vs "this is test-controlled or contrived output". Overall I really liked this video. I Also found multiple assertions curious. Have you ever taken advantage of a test class to use before to setup for tests, and then have method per assertion about the outcome?
@elliottstech3103 жыл бұрын
I'm liking that php storm can accurately give me all the references in tests that use a function I'm interested in testing when I use anonymous class instead of the mock builder. The mock builder flaw is it links to functions with strings. So renaming a function breaks a bunch of tests. Which is just a minor minor inconveniences, but now can be avoided by writing my own test double.