Ancestors

Toot

Written by Greg Korba on 2025-01-16 at 15:06

Please, never do this 🙏. It's a waste of time to write such test, waste of resources to run it, and waste of any code reader's time. It's obvious that creating instance of Foo will end up with an object that is an instance of Foo, no need to test it 🤦‍♂️.

=> View attached media

=> More informations about this toot | More toots from codito@mas.to

Descendants

Written by Dan Leech on 2025-01-16 at 15:13

@codito would I be evil if I said I may have done similar as a lazy way to assert that the object can be constructed? (i can't remember the specific case, but yeah...)

but more recently I think PHPStan would stop me from doing this.

=> More informations about this toot | More toots from dantleech@fosstodon.org

Written by Greg Korba on 2025-01-16 at 15:15

@dantleech Most probably you need to construct it in other tests anyway, so there's no need for dedicated test that only does assertInstanceOf 😊.

=> More informations about this toot | More toots from codito@mas.to

Written by Dan Leech on 2025-01-16 at 15:16

@codito maybe heh.

=> More informations about this toot | More toots from dantleech@fosstodon.org

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113838652591346305
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
266.685667 milliseconds
Gemini-to-HTML Time
0.683285 milliseconds

This content has been proxied by September (3851b).