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

Phpunit fix for running tests in separate process #135

Closed
wants to merge 1 commit into from

Conversation

dragos5436
Copy link

To fix the following error messages:

1) report_customsql\external\external_get_users_test::test_get_users_site_config
coding_exception: Coding error detected, it must be fixed by a programmer: When including this file for a unit test, the test must be run in an isolated process. See the PHPUnit @runInSeparateProcess and @runTestsInSeparateProcesses annotations.

/var/www/html/lib/setuplib.php:2204
/var/www/html/lib/externallib.php:35
/var/www/html/report/customsql/classes/external/get_users.php:22
/var/www/html/lib/classes/component.php:144
/var/www/html/report/customsql/tests/external/external_get_users_test.php:73
/var/www/html/lib/phpunit/classes/advanced_testcase.php:94

2) report_customsql\external\external_get_users_test::test_get_users_site_viewreports
Error: Class "report_customsql\external\get_users" not found

/var/www/html/report/customsql/tests/external/external_get_users_test.php:91
/var/www/html/lib/phpunit/classes/advanced_testcase.php:94

3) report_customsql\external\external_get_users_test::test_get_users_customsql_view
Error: Class "report_customsql\external\get_users" not found

/var/www/html/report/customsql/tests/external/external_get_users_test.php:116
/var/www/html/lib/phpunit/classes/advanced_testcase.php:94

4) report_customsql\external\external_get_users_test::test_get_users_serch_without_admins
Error: Class "report_customsql\external\get_users" not found

/var/www/html/report/customsql/tests/external/external_get_users_test.php:148
/var/www/html/lib/phpunit/classes/advanced_testcase.php:94

5) report_customsql\external\external_get_users_test::test_get_users_serch_with_admin
Error: Class "report_customsql\external\get_users" not found

/var/www/html/report/customsql/tests/external/external_get_users_test.php:166
/var/www/html/lib/phpunit/classes/advanced_testcase.php:94

@golenkovm
Copy link

Linking this to #140 and #141
Cheers

@golenkovm
Copy link

Hi @timhunt

Could you please take a look at this when you have a chance? Much appreciated.

Kind regards,
Misha

@timhunt
Copy link
Member

timhunt commented Oct 9, 2023

As you point out, this is a duplicate. Not helpful. Sorry, I am busy. Duplciates don't help. (But, thanks for trying to be helpful.)

@timhunt timhunt closed this Oct 9, 2023
@golenkovm
Copy link

Hi @timhunt

Thanks for looking into this. However, I can't see where this is a duplicate of the issues linked to it. Am I missing another pull request that resolves the issue?

Cheers,
Misha

@dragos5436
Copy link
Author

Hi,

I also had a look at pull requests yesterday and wasn't able to find a duplicate.

Kind regards,
Dragos

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