Commit graph

3738 commits

Author SHA1 Message Date
Paul Holden
bd0f8a058f
MDL-79717 phpunit: ensure unique data provider keys in tests.
Duplicate data provider keys were overwriting and/or duplicating
one another, leading to some cases being skipped.

Other "duplicate array key" errors were picked up by `phpcs` in
this dragnet across all tests, which have also been fixed.
2024-07-10 14:08:49 +01:00
Huong Nguyen
ccd8089de9
Merge branch 'MDL-80907' of https://github.com/marinaglancy/moodle 2024-07-04 11:12:50 +07:00
Amaia Anabitarte
f9497ceade MDL-81771 core_report: Add Report as subsystem 2024-07-03 15:47:46 +02:00
Ilya Tregubov
8dc76d79e5 Merge branch 'main_MDL-82141' of https://github.com/mattporritt/moodle 2024-07-02 13:19:55 +08:00
Ilya Tregubov
0a7fddefd3 MDL-81647 core: Code style fix. 2024-07-02 10:15:18 +08:00
Ilya Tregubov
f0d194089f Merge branch 'MDL-81647-main' of https://github.com/andrewnicols/moodle 2024-07-02 09:26:13 +08:00
Sara Arjona
576e63cb0f
Merge branch 'MDL-63753' of https://github.com/larsbonczek/moodle 2024-07-01 12:18:50 +02:00
Amaia Anabitarte
de2adae485 MDL-79971 completion: Don't assume a completed activity is viewed 2024-06-28 10:14:46 +02:00
Jun Pataleta
1306c52855
Merge branch 'MDL-81960-main' of https://github.com/andrewnicols/moodle 2024-06-27 12:16:18 +08:00
Andrew Nicols
e3f795fc72
MDL-81960 core: Move progress_trace tests out of weblib 2024-06-27 11:35:37 +08:00
Andrew Nicols
097b3fbee3
MDL-81960 core: Move moodle_url tests to correct location 2024-06-27 11:35:31 +08:00
Andrew Nicols
b637f8cc4e
MDL-81960 core: Coding style fixes 2024-06-27 11:34:30 +08:00
Jun Pataleta
e84daab7dd
Merge branch 'MDL-82183-main-squashed' of https://github.com/andrewnicols/moodle 2024-06-27 08:49:13 +08:00
Jun Pataleta
75f2afc3dc
Merge branch 'MDL-81920' of https://github.com/paulholden/moodle 2024-06-26 23:23:01 +08:00
Andrew Nicols
9043dc75bf
MDL-82183 core: Coding style fixes for core\output 2024-06-26 23:00:33 +08:00
Andrew Nicols
ff0fd2764a
MDL-82183 core: Update namespace of moved output classes 2024-06-26 23:00:33 +08:00
Andrew Nicols
2fff48b07c
MDL-82183 core: Migrate all output classes to autoloaded 2024-06-26 23:00:31 +08:00
Paul Holden
751aa2efc3
MDL-81920 core: move emoticon manager class into autoload namespace. 2024-06-26 14:23:30 +01:00
Paul Holden
cc30087d84
MDL-81920 lang: move language string class into autoload namespace. 2024-06-26 14:23:11 +01:00
Lars Bonczek
a48d11dd7d MDL-63753 course: Show stealth activity links to non-editing teachers 2024-06-26 12:57:36 +02:00
Eloy Lafuente (stronk7)
ad5fe71868
MDL-82207 phpunit: fix various @covers annotations (take#1)
This fixes various (not all) wrong @covers annotations that
are reported as warnings by PHPUnit when it's run with
code-coverage enabled.

When possible, the preferred solution is to change to
@covers at class level, that is the recommended way.

If multiple classes are involved, then a mix of @coversDefaultClass
and @covers at method level are used (always trying to use the
minimum needed patch).

This is the first of a series of issues created as sub-tasks
of MDL-82142.
2024-06-24 12:07:39 +02:00
Matt Porritt
c6e0b0f346 MDL-82141 Administration: Use toggle for Plugin Management Table
Replace the "eye" icon for enabling and disabling plugins in tables
that use the Plugin Management Table (plugin_management_table) class
with the Font Awesome "toggle" icon.
2024-06-21 12:18:55 +10:00
Andrew Nicols
e138e03b2f
MDL-81960 core: Move moodle_url to \core\url 2024-06-20 23:21:56 +08:00
Huong Nguyen
ebae7fbae4
Merge branch 'MDL-81523' of https://github.com/stronk7/moodle 2024-06-19 09:52:10 +07:00
Paul Holden
3724f682b3
Merge branch 'MDL-82191-main' of https://github.com/andrewnicols/moodle into main 2024-06-18 12:11:23 +01:00
Eloy Lafuente (stronk7)
adb4a5aade
MDL-82148 phpunit: Remove all cases of multiple @coversDefaultClass
Only one by class is allowed (to be used as shortcut exclusively)
2024-06-15 21:43:31 +02:00
Eloy Lafuente (stronk7)
674497a12c
MDL-81523 phpunit: Add all missing setUp/tearDown parent calls
All setUp(), tearDown(), setUpBeforeClass() and tearDownAfterClass()
must, always, call to parent, to ensure that everything is properly
set and cleaned.

While in a lot of situations this is not needed (parents may not
have anything to run), with PHPUnit >= 10 this can become more
important because we are going to move the reset code from current
placement @ runBare() to setUp()/tearDown().

Note that all the changes performed in this commit have been detected
and fixed by moodle-cs (ParentSetUpTearDownSniffTest).
2024-06-14 16:04:57 +02:00
Andrew Nicols
8c1ab804b3
MDL-82191 core: Deprecated unused stale libraries 2024-06-14 09:27:42 +08:00
Huong Nguyen
6b0c51a2ca
Merge branch 'MDL-81781' of https://github.com/paulholden/moodle 2024-06-13 10:12:37 +07:00
Sara Arjona
b1b3f409fc
Merge branch 'MDL-81942' of https://github.com/paulholden/moodle 2024-06-12 15:47:54 +02:00
Paul Holden
f4d4f1ca6a
MDL-81942 user: guests should respect default site homepage setting. 2024-06-12 11:34:59 +01:00
Eloy Lafuente (stronk7)
6c35a65e1a
MDL-81522 phpunit: Add a few non-void return types to tests
This is the final (3rd) commit, where we are adding missing
return types to a few tests (using @depends) which return
types are non-void, but something really returned (for consume
by the dependent test).
2024-06-11 11:55:08 +02:00
Eloy Lafuente (stronk7)
4f7631113c
MDL-81522 phpunit: Add missing void return type to all tests #2
This commit includes more changes, all them also adding the :void
return type to unit tests missing them.

The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.

All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
2024-06-11 11:55:08 +02:00
Eloy Lafuente (stronk7)
01148a0816
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 11:55:07 +02:00
Paul Holden
a0d5133f10
MDL-81781 dataformat: public helper method to get writer instance. 2024-06-07 11:29:10 +01:00
Andrew Nicols
8a92cb82a6
Merge branch 'MDL-81794-main' of https://github.com/meirzamoodle/moodle 2024-06-06 22:02:36 +08:00
Andrew Nicols
2e05b9111b
MDL-81894 core: system_clock should use the server timezone 2024-06-06 00:17:10 +08:00
Andrew Nicols
c14253b2eb
Merge branch 'MDL-80831-main' of https://github.com/junpataleta/moodle 2024-05-29 14:26:53 +08:00
Jun Pataleta
89c6376fcc
MDL-80831 behat: Re-enable target-size rule for accessibility tests 2024-05-29 10:39:17 +08:00
meirzamoodle
ba8cb7874f MDL-81794 core: Fix the TLS issue on the Redis
The fix covers two places:
- The Redis session.
- The Redis cache store.

The PHP Redis has the option to establish the connection using TLS/SSL instead of using the "tls://" prefix.
This is done to ensure consistency with the Redis cluster connection,
as the code for both single and cluster connections is located in one place.
2024-05-29 09:14:27 +07:00
Andrew Nicols
9745580bf4
Merge branch 'MDL-81282' of https://github.com/paulholden/moodle 2024-05-29 09:45:00 +08:00
Huong Nguyen
175e48bc08
Merge branch 'MDL-54105-master-default_grade_on_mod_assign' of https://github.com/praxisdigital/moodle 2024-05-28 15:21:39 +07:00
Frederik Milling Pytlick
cf7e43666b MDL-54105 mod_assign: Added default gradetype and gradescale
Added 2 new settings to mod_assign and made moodle core look for them to set the default grade values.
2024-05-28 09:10:20 +02:00
Andrew Nicols
7fc931cdd8
Merge branch 'MDL-81698' of https://github.com/stronk7/moodle 2024-05-28 10:10:39 +08:00
Eloy Lafuente (stronk7)
018e6e1fc8
MDL-81698 phpunit: Apply various fixes towards 1by1 execution
The changes here are heterogeneous:
- Include stuff that is not available (other test has included it).
  Sometimes local to a unit test, others in setupBeforeClass() or
  globally, ... depends on every case.
- Rename some tests (namespaces, test name, ...) towards getting it
  running.
- Amend small bits here and there.

Important note: I've left any "cosmetic" warning out from the
changes, only a few errors (like long array syntax) have been fixed.
2024-05-25 17:19:44 +02:00
Eloy Lafuente (stronk7)
6fe0e66d06
MDL-81698 phpunit: Uncomment some tests and make them skipped
There are a few tests in core that are commented since the
beginning. That's not useful at all, so with this commit we
are un-commenting them instead.

Note that this is an initial step to have them back with skipped
outcome. Later in this issue we'll decide about to keep them or
completely remove them (each test can have a different outcome).
2024-05-25 17:19:43 +02:00
Paul Holden
c9d2e72943
MDL-81282 dml: replace occurrences of large integers with new constant.
Where calling code was previously using either the 32-bit limit, or a
value equal to SQL_INT_MAX inside a database read/write, instead use
our new constant.
2024-05-24 22:19:54 +01:00
Anupama Sarjoshi
f0168354b6 MDL-81915 admin: Fix test_admin_output_new_settings_by_page unit test 2024-05-24 11:15:38 +01:00
Marina Glancy
8f2d505e38 MDL-80907 behat: be more precise in selecting table rows 2024-05-07 19:27:07 +01:00
Paul Holden
be7802fa88
MDL-72353 report: final removal of deprecated report selection method. 2024-05-06 20:22:08 +01:00