Commit Graph

13 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
81f05b3239 MDL-75716 phpunit: Move tests to use correct names and ns (take#5)
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:

- In lib/tests/blocklib_test.php 2 helper classes have been
  moved to tests/fixtures, because they needed to be namespace-free.
2022-09-12 19:29:34 +02:00
Eloy Lafuente (stronk7)
ba5b6089d5 MDL-71036 phpunit: Renamed various regexp-related assertions
In PHPUnit 9.1, the following regexp-related assertions
have been deprecated and there are new alternatives for
all them:
    - assertRegExp()     -> assertMatchesRegularExpression()
    - assertNotRegExp()  -> assertDoesNotMatchRegularExpression()

This is about to, simply, move all cases to the new alternatives.

Source: https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md

Regexp to find all them:

    ag 'assertRegExp|assertNotRegExp' -li
2021-03-11 19:22:24 +01:00
David Mudrák
87f9e88ddd MDL-68563 filters: Fix unit test regressions
Also incrementing the plugin versions to make sure the unit test
environment is reinitialised and the tests are reliable.

Minor correction of phpdocs @package tags included.
2020-05-13 16:28:24 +08:00
Andrew Nicols
1144ae255f Revert "MDL-61876 admin: set default forceclean=1"
This reverts commit c182f060fa.
2018-05-08 13:28:12 +08:00
Marina Glancy
c182f060fa MDL-61876 admin: set default forceclean=1 2018-04-17 09:39:22 +08:00
David Mudrák
4b82c15cdb MDL-60940 weblib: Introduce an ability to force cleaning of all content
The new configuration flag $CFG->forceclean overrides the noclean
option when calling format_text() so that the text is always
and unconditionally cleaned.
2018-04-11 10:23:45 +02:00
Eloy Lafuente (stronk7)
55946a892a MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests
This includes:

- Changing PHPUnit's bootstrap to use https://www...
- Modify all existing expectations to the new wwwroot.
- Amend some tests now with different defaults because of is_https()
- Added a note to main upgrade.php about the change.
2017-04-18 03:40:17 +02:00
Damyon Wiese
b9b409cfc3 MDL-40759 icons: Peer review fixes (all minor) 2017-03-17 15:52:46 +08:00
Damyon Wiese
0b772813dc MDL-40759 icons: Update unit tests
Match the expected output for unit tests.
2017-03-17 15:52:17 +08:00
Cameron Ball
2549f46f7c MDL-54853 weblib: Properly specify encoding for blanktarget 2016-06-08 18:29:19 +08:00
Cameron Ball
bf9974870b MDL-37138 weblib: Add blanktarget option to format_text 2016-05-30 13:17:59 +08:00
Eloy Lafuente (stronk7)
0d6f53e8f7 MDL-50491 filters: Some final touches.
- Complete the deprecation information to follow the rules.
- Minor tweak to PLAIN tests to have clearer expectations.
- Completely delete get_global_config() from filters, there
  was not much utility keeping it there. Note we have opted
  for direct deletion because it's private API, not public one
  (and searching github/google/docs did not reveal any use
  of those functions either, just in case).
2015-06-18 04:11:24 +02:00
Tim Hunt
7d94679ff1 MDL-50491 filters: option to disable some filters in filter_text.
This lets you programmatically prevent certain filters running on
certain content.

Also, I created some unit tests for the basic format_text functionality
since there did not seem to be any yet.
2015-06-17 13:48:55 +01:00