Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 47... Línea 47...
47
 * @package    core_xapi
47
 * @package    core_xapi
48
 * @since      Moodle 3.9
48
 * @since      Moodle 3.9
49
 * @copyright  2020 Ferran Recio
49
 * @copyright  2020 Ferran Recio
50
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
50
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
51
 */
51
 */
52
class statement_test extends advanced_testcase {
52
final class statement_test extends advanced_testcase {
Línea 53... Línea 53...
53
 
53
 
54
    /**
54
    /**
55
     * Returns a valid item for a specific attribute.
55
     * Returns a valid item for a specific attribute.
56
     *
56
     *
Línea 182... Línea 182...
182
    /**
182
    /**
183
     * Data provider for the test_create and test_create_from_data tests.
183
     * Data provider for the test_create and test_create_from_data tests.
184
     *
184
     *
185
     * @return  array
185
     * @return  array
186
     */
186
     */
187
    public function create_provider(): array {
187
    public static function create_provider(): array {
188
        return [
188
        return [
189
            'Agent statement with no extras' => [
189
            'Agent statement with no extras' => [
190
                true, [], []
190
                true, [], []
191
            ],
191
            ],
192
            'Agent statement with context' => [
192
            'Agent statement with context' => [
Línea 411... Línea 411...
411
    /**
411
    /**
412
     * Data provider for the text_invalid_gets.
412
     * Data provider for the text_invalid_gets.
413
     *
413
     *
414
     * @return  array
414
     * @return  array
415
     */
415
     */
416
    public function invalid_gets_provider(): array {
416
    public static function invalid_gets_provider(): array {
417
        return [
417
        return [
418
            'Method get_user on empty statement' => ['get_user', true],
418
            'Method get_user on empty statement' => ['get_user', true],
419
            'Method get_all_users on empty statement' => ['get_all_users', true],
419
            'Method get_all_users on empty statement' => ['get_all_users', true],
420
            'Method get_group on empty statement' => ['get_group', true],
420
            'Method get_group on empty statement' => ['get_group', true],
421
            'Method get_verb_id on empty statement' => ['get_verb_id', true],
421
            'Method get_verb_id on empty statement' => ['get_verb_id', true],
Línea 530... Línea 530...
530
    /**
530
    /**
531
     * Data provider for the test_invalid_data tests.
531
     * Data provider for the test_invalid_data tests.
532
     *
532
     *
533
     * @return  array
533
     * @return  array
534
     */
534
     */
535
    public function invalid_data_provider(): array {
535
    public static function invalid_data_provider(): array {
536
        return [
536
        return [
537
            'No actor, no verb, no object'  => [false, false, false],
537
            'No actor, no verb, no object'  => [false, false, false],
538
            'No actor, verb, no object'     => [false, true, false],
538
            'No actor, verb, no object'     => [false, true, false],
539
            'No actor, no verb, object'     => [false, false, true],
539
            'No actor, no verb, object'     => [false, false, true],
540
            'No actor, verb, object'        => [false, true, true],
540
            'No actor, verb, object'        => [false, true, true],