Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 32... Línea 32...
32
 * @copyright  2023 Andrew Lyons <andrew@nicols.co.uk>
32
 * @copyright  2023 Andrew Lyons <andrew@nicols.co.uk>
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 \communication_matrix\local\command
34
 * @covers \communication_matrix\local\command
35
 * @coversDefaultClass \communication_matrix\local\command
35
 * @coversDefaultClass \communication_matrix\local\command
36
 */
36
 */
37
class command_test extends \advanced_testcase {
37
final class command_test extends \advanced_testcase {
38
    use \communication_matrix\matrix_client_test_trait;
38
    use \communication_matrix\matrix_client_test_trait;
Línea 39... Línea 39...
39
 
39
 
40
    /**
40
    /**
41
     * Test instantiation of a command when no method is provided.
41
     * Test instantiation of a command when no method is provided.
Línea 350... Línea 350...
350
     * @return array
350
     * @return array
351
     */
351
     */
352
    public static function sendasjson_provider(): array {
352
    public static function sendasjson_provider(): array {
353
        return [
353
        return [
354
            'As JSON' => [
354
            'As JSON' => [
355
                'sendasjon' => true,
355
                'sendasjson' => true,
356
                'endpoint' => 'example/:id/endpoint',
356
                'endpoint' => 'example/:id/endpoint',
357
                'params' => [
357
                'params' => [
358
                    ':id' => 12345,
358
                    ':id' => 12345,
359
                    'name' => 'matrix',
359
                    'name' => 'matrix',
360
                ],
360
                ],