fmido88 / moodle-enrol_wallet

Enrollment using wallet credit with coupons and using payments gateways with restrictions.
Other
4 stars 1 forks source link

table_exists error #14

Closed ewallah closed 11 months ago

ewallah commented 11 months ago

vendor/bin/phpunit --colors --no-coverage --testsuite tool_dataprivacy_testsuite

...............................................................  63 / 306 ( 20%)
............................................................... 126 / 306 ( 41%)
............................................................... 189 / 306 ( 61%)
.................E............................................. 252 / 306 ( 82%)
......................................................          306 / 306 (100%)

Time: 00:52.784, Memory: 143.00 MB

There was 1 error:

1) tool_dataprivacy\expired_contexts_test::test_orphaned_records_are_cleared
Unexpected debugging() call detected.
Debugging: Call to undefined method pgsql_native_moodle_database::table_exists()
* line 190 of /payment/classes/privacy/provider.php: call to enrol_wallet\privacy\provider::delete_data_for_all_users_in_context()
* line 8149 of /lib/moodlelib.php: call to core_payment\privacy\provider::delete_data_for_all_users_in_context()
* line 578 of /privacy/classes/manager.php: call to component_class_callback()
* line 611 of /privacy/classes/manager.php: call to core_privacy\manager::component_class_callback()
* line 492 of /privacy/classes/manager.php: call to core_privacy\manager->handled_component_class_callback()
* line 440 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to core_privacy\manager->delete_data_for_all_users_in_context()
* line 388 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to tool_dataprivacy\expired_contexts_manager->delete_expired_context()
* line 2052 of /admin/tool/dataprivacy/tests/expired_contexts_test.php: call to tool_dataprivacy\expired_contexts_manager->process_approved_deletions()
* line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to tool_dataprivacy\expired_contexts_test->test_orphaned_records_are_cleared()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
* line 81 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
* line 728 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
* line 904 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 653 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
* line 144 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->run()
* line 97 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
* line 98 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 123 of /vendor/bin/phpunit: call to include()

lib/phpunit/classes/advanced_testcase.php:89

ERRORS!
Tests: 306, Assertions: 1214, Errors: 1.

$DB->table_exist() function does not exist in Moodle, however one can use

$dbman = $DB->get_manager();
$dbman->table_exists()
fmido88 commented 11 months ago

Thanks, I'll rebuild the whole privacy.php