Automattic / wordbless

WorDBless allows you to use WordPress core functions in your PHPUnit tests without having to set up a database and the whole WordPress environment
Other
131 stars 6 forks source link

Skip exit in wp_die() function #30

Closed wppunk closed 4 years ago

wppunk commented 4 years ago

Fixes: #28

I've skipped die in the wp_die function.

szepeviktor commented 4 years ago

Short array syntax is not allowed

This is so hard!

leogermani commented 4 years ago

Thanks for the PR!

A question worth asking. Do we want these filters enabled by default in all cases? Are there any situations when we would not want to activate this?

szepeviktor commented 4 years ago

Do we want these filters enabled by default in all cases?

Yes, it is reasonable to make these optional. Although I do not know how.

wppunk commented 4 years ago

@leogermani I think these filters are important by default because use the die function in the test stops it. This PR only starts for this and I sure next you can add other cases when need to prevent the die function.

szepeviktor commented 4 years ago

That seems reasonable. But could you think of a test case that wants core to execute exit; ?