forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-70070 phpunit: correct data provider method names.
They should not be prefixed `test_` because that's how actual test methods containing assertions are identified by PHPUnit.
- Loading branch information
1 parent
5dbac07
commit af8da7c
Showing
26 changed files
with
119 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Provides the {@link filter_mathjaxloader_filter_testcase} class. | ||
* | ||
* @package filter_mathjaxloader | ||
* @category test | ||
* @copyright 2017 David Mudrák <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace filter_mathjaxloader; | ||
|
||
use filter_mathjaxloader; | ||
|
@@ -35,6 +26,8 @@ | |
/** | ||
* Unit tests for the MathJax loader filter. | ||
* | ||
* @package filter_mathjaxloader | ||
* @category test | ||
* @copyright 2017 David Mudrak <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
@@ -46,7 +39,7 @@ class filter_test extends \advanced_testcase { | |
* @param string $moodlelangcode the user's current language | ||
* @param string $mathjaxlangcode the mathjax language to be used for the moodle language | ||
* | ||
* @dataProvider test_map_language_code_expected_mappings | ||
* @dataProvider map_language_code_expected_mappings | ||
*/ | ||
public function test_map_language_code($moodlelangcode, $mathjaxlangcode) { | ||
|
||
|
@@ -59,7 +52,7 @@ public function test_map_language_code($moodlelangcode, $mathjaxlangcode) { | |
* | ||
* @return array of [moodlelangcode, mathjaxcode] tuples | ||
*/ | ||
public function test_map_language_code_expected_mappings() { | ||
public function map_language_code_expected_mappings() { | ||
|
||
return [ | ||
['cz', 'cs'], // Explicit mapping. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Testing the H5PFrameworkInterface interface implementation. | ||
* | ||
* @package core_h5p | ||
* @category test | ||
* @copyright 2019 Mihail Geshoski <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace core_h5p; | ||
|
||
use core_collator; | ||
|
@@ -34,6 +25,7 @@ | |
* Test class covering the H5PFrameworkInterface interface implementation. | ||
* | ||
* @package core_h5p | ||
* @category test | ||
* @copyright 2019 Mihail Geshoski <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
* @runTestsInSeparateProcesses | ||
|
@@ -638,7 +630,7 @@ public function test_getLibraryId_non_existent_minor_version() { | |
/** | ||
* Test the behaviour of isPatchedLibrary(). | ||
* | ||
* @dataProvider test_isPatchedLibrary_provider | ||
* @dataProvider isPatchedLibrary_provider | ||
* @param array $libraryrecords Array containing data for the library creation | ||
* @param array $testlibrary Array containing the test library data | ||
* @param bool $expected The expectation whether the library is patched or not | ||
|
@@ -660,7 +652,7 @@ public function test_isPatchedLibrary(array $libraryrecords, array $testlibrary, | |
* | ||
* @return array | ||
*/ | ||
public function test_isPatchedLibrary_provider(): array { | ||
public function isPatchedLibrary_provider(): array { | ||
return [ | ||
'Unpatched library. No different versioning' => [ | ||
[ | ||
|
@@ -1416,7 +1408,7 @@ public function test_loadLibrary_non_existent_library() { | |
/** | ||
* Test the behaviour of loadLibrarySemantics(). | ||
* | ||
* @dataProvider test_loadLibrarySemantics_provider | ||
* @dataProvider loadLibrarySemantics_provider | ||
* @param array $libraryrecords Array containing data for the library creation | ||
* @param array $testlibrary Array containing the test library data | ||
* @param string $expected The expected semantics value | ||
|
@@ -1439,7 +1431,7 @@ public function test_loadLibrarySemantics(array $libraryrecords, array $testlibr | |
* | ||
* @return array | ||
*/ | ||
public function test_loadLibrarySemantics_provider(): array { | ||
public function loadLibrarySemantics_provider(): array { | ||
|
||
$semantics = json_encode( | ||
[ | ||
|
@@ -2208,7 +2200,7 @@ public function test_getLibraryContentCount() { | |
/** | ||
* Test the behaviour of test_libraryHasUpgrade(). | ||
* | ||
* @dataProvider test_libraryHasUpgrade_provider | ||
* @dataProvider libraryHasUpgrade_provider | ||
* @param array $libraryrecords Array containing data for the library creation | ||
* @param array $testlibrary Array containing the test library data | ||
* @param bool $expected The expectation whether the library is patched or not | ||
|
@@ -2230,7 +2222,7 @@ public function test_libraryHasUpgrade(array $libraryrecords, array $testlibrary | |
* | ||
* @return array | ||
*/ | ||
public function test_libraryHasUpgrade_provider(): array { | ||
public function libraryHasUpgrade_provider(): array { | ||
return [ | ||
'Lower major version; Identical lower version' => [ | ||
[ | ||
|
Oops, something went wrong.