Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 23... Línea 23...
23
 * @covers      \factor_sms\factor
23
 * @covers      \factor_sms\factor
24
 * @package     factor_sms
24
 * @package     factor_sms
25
 * @copyright   2023 Raquel Ortega <raquel.ortega@moodle.com>
25
 * @copyright   2023 Raquel Ortega <raquel.ortega@moodle.com>
26
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27
 */
27
 */
28
class factor_test extends \advanced_testcase {
28
final class factor_test extends \advanced_testcase {
Línea 29... Línea 29...
29
 
29
 
30
    /**
30
    /**
31
     * Data provider for test_format_number().
31
     * Data provider for test_format_number().
32
     *
32
     *
33
     * @return array of different country codes and phone numbers.
33
     * @return array of different country codes and phone numbers.
34
     */
34
     */
Línea 35... Línea 35...
35
    public function format_number_provider(): array {
35
    public static function format_number_provider(): array {
36
 
36
 
37
        return [
37
        return [
38
            'Phone number with local format' => [
38
            'Phone number with local format' => [
Línea 86... Línea 86...
86
    /**
86
    /**
87
     * Data provider for test_is_valid__phonenumber().
87
     * Data provider for test_is_valid__phonenumber().
88
     *
88
     *
89
     * @return array with different phone numebr tests
89
     * @return array with different phone numebr tests
90
     */
90
     */
91
    public function is_valid_phonenumber_provider(): array {
91
    public static function is_valid_phonenumber_provider(): array {
92
        return [
92
        return [
93
            ['+919367788755', true],
93
            ['+919367788755', true],
94
            ['8989829304', false],
94
            ['8989829304', false],
95
            ['+16308520397', true],
95
            ['+16308520397', true],
96
            ['786-307-3615', false],
96
            ['786-307-3615', false],