cachethq / core

🚦 The core of Cachet, the open-source status page system.
https://cachethq.io
MIT License
101 stars 20 forks source link

Add basic Pest architecture tests #28

Closed ash-jc-allen closed 9 months ago

ash-jc-allen commented 9 months ago

Hey @jbrooksuk! This PR adds some new Pest architecture tests that I've quickly put together.

I wasn't sure how in-depth and strict you'd want them to be, so I've kept them all fairly lax. But I'm hoping they'll add some value by enforcing some conventions for future contributions.

If there's anything you'd like me to change, please give me a shout 😄

jbrooksuk commented 9 months ago

@ash-jc-allen tests still fail unfortunately.

ash-jc-allen commented 9 months ago

Sorry @jbrooksuk, I got distracted and completely forgot to fix them haha! I've just had a look at them and I think they're failing for the prefers-lowest because it's using pestphp/pest v2.13.0, but the architecture toHaveMethod expectation was only added last week in v2.17.0.

It looks like there was already a toHaveMethod expectation earlier in Pest, but it worked slightly different to the newer version.

For reference: https://github.com/pestphp/pest/issues/951

So I've just removed that expectation for the time being. Hopefully this is all okay? 🙂