Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward TestCase bad method calls to global functions #169

Merged
merged 1 commit into from
Aug 25, 2020
Merged

Forward TestCase bad method calls to global functions #169

merged 1 commit into from
Aug 25, 2020

Conversation

felixdorn
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
// tests/Helpers.php

function assertSomething() {}
// tests/SomeTest.php

it('works')->assertSomething();

Right now, any functions can be called like substr or dd, maybe we want to restrict that behavior to function asserting something. (if there is no new assertions, we still throw a BadMethodCallException) ?

This is still WIP but it works, without breaking any existing test.

@nunomaduro
Copy link
Member

Can you rebase?

@felixdorn felixdorn closed this Aug 25, 2020
@felixdorn felixdorn reopened this Aug 25, 2020
@felixdorn felixdorn marked this pull request as ready for review August 25, 2020 11:47
@felixdorn
Copy link
Contributor Author

I've managed to do it! That was more complicated that expected 😄

@nunomaduro nunomaduro merged commit 3c79c89 into pestphp:master Aug 25, 2020
@nunomaduro
Copy link
Member

Great! Can you update the docs about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants