Commit Graph

9 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
0ed53be9b2 MDL-66902 tests: Fix all incorrect namespaces
This issue just goes over all the currently incorrect
namespaces in test cases and:

1. Change the namespace to the correct one.
2. Move/rename it to correct location if needed (level 2 and down).
3. Remove not needed MOODLE_INTERNAL check when possible.
4. Remove file phpdoc when the file only has one class.
5. Make small adjustments in case the change of namespace requires it.
2022-09-26 14:12:16 +02:00
Eloy Lafuente (stronk7)
870a8de3fb MDL-37655 phpunit: Avoid having multiple testcase classes in 1 file
Note that there wasn't any case of multiple testcase classes in
1 file. All the cases reported in the issue were false positives
caused but other "mock/fixture" files being named _test.

So all this issue does is:

1) rename any _test suffixed class in test files, because we are
   going to start renaming a lot of test classes to _test.

2) ensure that the 2 test case classes modified in this issue,
   are already observing the filename = classname rule that will
   be implemented soon (and verigy it works).
2021-03-30 19:17:54 +02:00
Eloy Lafuente (stronk7)
40de097e65 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:00 +02:00
Andrew Nicols
b9819842d9 MDL-60948 tool_httpsreplace: Correct use of test URLs 2017-12-11 12:05:57 +08:00
Marina Glancy
84a9f58b67 MDL-46269 tool_httpsreplace: minor fixes
- don't call curl() from unittests
- make sure we don't replace links to http:// urls when the embedded contents from the same domain is present
- convert only text or long varchar columns
- improve searching performance, use case-insensitive regex/like instead of LOWER
- add unittests for the above and also for international domains
2017-10-16 16:53:49 +08:00
John Okely
4b86dd7ba6 MDL-46269 tool_httpsreplace: Make param search case insensitive 2017-10-16 16:11:15 +08:00
John Okely
7821d93aa6 MDL-46269 tool_httpsreplace: Make tool ready for core
Remove known domains add config for renames
Fix coding style
Add capability checks
Add page setters
Match moodle string style
Disable form change checker for form
Add todo issue
Fix docs
Bump version
2017-10-16 16:11:14 +08:00
John Okely
836226c4ad MDL-46269 tool_httpsreplace: Use data providers in unit tests 2017-10-16 16:11:14 +08:00
John Okely
eca2b34cb0 MDL-46269 tool_httpsreplace: Add tool_httpsreplace to core 2017-10-16 16:11:13 +08:00