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

Use in PHPUnit processIsolation="true" environment #49

Open
Felio opened this issue Mar 3, 2020 · 2 comments
Open

Use in PHPUnit processIsolation="true" environment #49

Felio opened this issue Mar 3, 2020 · 2 comments

Comments

@Felio
Copy link

Felio commented Mar 3, 2020

Can I use soft-mocks in PHPUnit processIsolation="true" environment?

...It may need a patch for TestCaseClass.tpl and TestCaseMethod.tpl (and skip to patch for phpunit entrypoint).

@YuriyNasretdinov
Copy link
Contributor

Soft Mocks should be safe to run concurrently. Not sure if process isolation is somehow different?

@Felio
Copy link
Author

Felio commented Mar 4, 2020

From my short investigation, PHPUnit runs tests using https://github.com/sebastianbergmann/phpunit/blob/master/src/Util/PHP/Template/TestCaseClass.tpl template in separated process.
So require_once $composerAutoload is called without SoftMocks::init().

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

No branches or pull requests

2 participants