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 🤦♂️.
=> More informations about this toot | More toots from codito@mas.to
@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
@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
@codito maybe heh.
=> More informations about this toot | More toots from dantleech@fosstodon.org This content has been proxied by September (3851b).Proxy Information
text/gemini