Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 31... Línea 31...
31
 * @package    profilefield_text
31
 * @package    profilefield_text
32
 * @copyright  2022 The Open University
32
 * @copyright  2022 The Open University
33
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 * @covers     \profilefield_text\profile_field_text
34
 * @covers     \profilefield_text\profile_field_text
35
 */
35
 */
36
class field_class_test extends \advanced_testcase {
36
final class field_class_test extends \advanced_testcase {
37
    /**
37
    /**
38
     * Test that the profile text data is formatted and required filters applied
38
     * Test that the profile text data is formatted and required filters applied
39
     *
39
     *
40
     * @covers \profile_field_text::display_data
40
     * @covers \profile_field_text::display_data
41
     * @dataProvider filter_profile_field_text_provider
41
     * @dataProvider filter_profile_field_text_provider
Línea 58... Línea 58...
58
    /**
58
    /**
59
     * Data provider for {@see test_filter_display_data}
59
     * Data provider for {@see test_filter_display_data}
60
     *
60
     *
61
     * @return string[]
61
     * @return string[]
62
     */
62
     */
63
    public function filter_profile_field_text_provider(): array {
63
    public static function filter_profile_field_text_provider(): array {
64
        return [
64
        return [
65
                'simple_string' => ['Simple string', 'Simple string'],
65
                'simple_string' => ['Simple string', 'Simple string'],
66
                'format_string' => ['HTML & is escaped', 'HTML & is escaped'],
66
                'format_string' => ['HTML & is escaped', 'HTML & is escaped'],
67
                'multilang_filter' =>
67
                'multilang_filter' =>
68
                    ['<span class="multilang" lang="en">English</span><span class="multilang" lang="fr">French</span>', 'English'],
68
                    ['<span class="multilang" lang="en">English</span><span class="multilang" lang="fr">French</span>', 'English'],