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

Unit function failure due to privacy provider implementation. #9

Open
andrewmadden opened this issue Mar 30, 2022 · 0 comments
Open

Comments

@andrewmadden
Copy link

Unit test failure:

vendor/bin/phpunit --testsuite tool_log_testsuite --filter test_get_contexts_for_userid``
1) tool_log_privacy_testcase::test_get_contexts_for_userid
Failed asserting that an array is empty.

/var/www/site/admin/tool/log/tests/privacy_test.php:69
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80
phpvfscomposer:///var/www/site/vendor/phpunit/phpunit/phpunit:60

The privacy provider provides the system context regardless if a userid is found in the plugin data here: https://github.com/trax-project/moodle-trax-logs/blob/master/classes/privacy/provider.php#L81

Context should only be added if userid found in actors table.

andrewmadden added a commit to andrewmadden/moodle-trax-logs that referenced this issue Mar 30, 2022
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

1 participant