Commit Graph

22 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 9f53b0e965 MDL-73971 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Eloy Lafuente (stronk7) 8f414e42a9 MDL-74279 phpunit: Tests using sqlsrv AdoDB must reset settings
AdoDB SQL*Server drivers use to modify some error and
logging preferences. As far as the connection is shared
with the main one, that implies that those settings
remain for the whole remaining execution.

We don't want his in tests, because can affect to other
tests at distance.

We are fixing this here, only for tests, because it
doesn't affect normal requests and because, once we
remove AdoDB this won't be needed anymore.
2022-03-26 18:40:11 +01:00
Sujith Haridasan 03093b42b8 MDL-71160 auth_db: Use strict comaprison
Use strict comparison to avoid type juggling.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-09-07 09:04:23 +02:00
Marina Glancy ef3d6a3d70 MDL-71051 core_user: use user profile generator in all tests 2021-04-28 11:47:21 +02:00
Marina Glancy 81fe9e9af5 MDL-68349 auth_db: user_created event should be triggered later 2020-10-30 14:18:02 +01:00
Andrew Nicols 7991e3032c MDL-65558 auth_db: use , as port separator 2019-05-10 12:23:49 +08:00
Jake Dallimore 4c00922f2e MDL-59581 database: remove mssql_native_moodle_database test from auth 2018-04-09 01:59:16 +02:00
Stephen Bourget 037273d87e MDL-12689: convert auth plugins to use settings.php 2017-04-03 10:50:09 -04:00
John Okely 22c98e1e5a MDL-57268 auth_db: Unit tests for deletion from a large user set 2016-12-19 10:06:55 +08:00
Andrew Nicols 21e8b48d13 MDL-51758 libraries: Remove password_compat library from core 2016-07-18 10:06:57 +08:00
Simey Lameze 5e60be8aaf MDL-52781 auth_db: deprecate clean_data method.
The old clean_data method has been deprecated as the user_create_user and user_updated user
    will be responsible by validating the user data.
2016-04-21 15:24:36 +08:00
Simey Lameze ce59760476 MDL-50705 auth_db: apply standard cleaning to all fields
Also unit tests were added to cover the new clean_data() method.
2016-03-10 13:17:08 +01:00
Marina Glancy cc3048eb41 MDL-52286 core: several fixes to ADOdb 2015-12-14 18:06:22 +08:00
Tony Levi 79d4558a58 MDL-52283 core: password_hash() deprecation in PHP7 2015-11-27 09:12:20 +08:00
Eloy Lafuente (stronk7) e3d9fc3f5a MDL-20365 auth_db: cross-db passfield case and saltedcrypt unit test 2014-11-26 12:11:46 +01:00
Tim Hunt a20d675250 MDL-47666 DB auth & enrol: unit tests fail with custom DB drivers
Changed to used $DB->get_db_family, rather than hard-coding the list of
class names.
2014-10-20 12:10:52 +01:00
Eloy Lafuente (stronk7) 6576413e48 MDL-44862 postgres: tests to support socket & port
Both the database auth and enrol plugins use ADOdb
to perform connections. Socket and port are allowed
there if passed as "socket:port", so, when both are
configured in CFG, we pass them that way. Else
ADOdb defaults to standard port (5432).
2014-03-31 09:28:57 +08:00
Petr Škoda bfaf4f00cb MDL-43903 prevent adodb error logging output in phpunit execution with
native ms sql driver
2014-01-30 10:39:34 +08:00
Petr Škoda 17601a7e12 MDL-39985 add explicit MariaDB support 2013-07-24 10:45:20 +08:00
Petr Škoda 92b00c32a7 MDL-37420 rework pg schema testing 2013-01-11 02:12:38 +01:00
Petr Škoda 59706ff6c7 MDL-37420 add support for db schemas in auth test 2013-01-08 17:20:42 +01:00
Petr Škoda e7aeaa6590 MDL-37304 cleanup auth_db and use progress_trace 2012-12-29 21:57:57 +01:00