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.
This commit is contained in:
Paul Holden
2023-01-16 08:28:31 +00:00
parent 4b69c11978
commit 70a5e38b2c
26 changed files with 120 additions and 179 deletions
+9 -16
View File
@@ -14,6 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
declare(strict_types = 1);
namespace core\plugininfo;
use testable_core_plugin_manager;
use testable_plugininfo_base;
/**
* Unit tests for plugin base class.
*
@@ -21,20 +28,6 @@
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
declare(strict_types = 1);
namespace core\plugininfo;
defined('MOODLE_INTERNAL') || die();
use core_plugin_manager;
use testable_core_plugin_manager;
use testable_plugininfo_base;
/**
* Tests of the basic API of the plugin manager.
*/
class base_test extends \advanced_testcase {
/**
@@ -172,7 +165,7 @@ class base_test extends \advanced_testcase {
* Test the load_disk_version function to check that it handles a range of correct supported and incompatible field
* definitions.
*
* @dataProvider test_load_disk_version_branch_supports_provider
* @dataProvider load_disk_version_branch_supports_provider
* @param array|null $supported Supported versions to inject
* @param string|int|null $incompatible Incompatible version to inject.
* @param int $version Version to test
@@ -204,7 +197,7 @@ class base_test extends \advanced_testcase {
*
* @return array
*/
public function test_load_disk_version_branch_supports_provider(): array {
public function load_disk_version_branch_supports_provider(): array {
return [
'Range, branch in support, lowest' => [
'supported' => [29, 31],