Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 168... Línea 168...
168
     *
168
     *
169
     * @dataProvider components_provider
169
     * @dataProvider components_provider
170
     * @param string $component component name
170
     * @param string $component component name
171
     * @param array $expected expected results
171
     * @param array $expected expected results
172
     */
172
     */
173
    public function test_component_names(string $component, array $expected) {
173
    public function test_component_names(string $component, array $expected): void {
Línea 174... Línea 174...
174
 
174
 
Línea 175... Línea 175...
175
        $this->resetAfterTest();
175
        $this->resetAfterTest();
176
 
176
 
Línea 207... Línea 207...
207
     * This test is used for wrong json format and empty structures.
207
     * This test is used for wrong json format and empty structures.
208
     *
208
     *
209
     * @dataProvider invalid_json_provider
209
     * @dataProvider invalid_json_provider
210
     * @param string $json json string to send
210
     * @param string $json json string to send
211
     */
211
     */
212
    public function test_invalid_json(string $json) {
212
    public function test_invalid_json(string $json): void {
Línea 213... Línea 213...
213
 
213
 
Línea 214... Línea 214...
214
        $this->resetAfterTest();
214
        $this->resetAfterTest();
215
 
215
 
Línea 270... Línea 270...
270
     * @param bool $multiple if send multiple statements (adds one valid statement)
270
     * @param bool $multiple if send multiple statements (adds one valid statement)
271
     * @param bool $validactor if the actor used is valid
271
     * @param bool $validactor if the actor used is valid
272
     * @param bool $validverb if the verb used is valid
272
     * @param bool $validverb if the verb used is valid
273
     * @param array $expected expected results
273
     * @param array $expected expected results
274
     */
274
     */
275
    public function test_statements_agent(bool $multiple, bool $validactor, bool $validverb, array $expected) {
275
    public function test_statements_agent(bool $multiple, bool $validactor, bool $validverb, array $expected): void {
276
        global $USER;
276
        global $USER;
Línea 277... Línea 277...
277
 
277
 
Línea 278... Línea 278...
278
        $this->resetAfterTest();
278
        $this->resetAfterTest();
Línea 323... Línea 323...
323
     * @param bool $multiple if send multiple statements (adds one valid statement)
323
     * @param bool $multiple if send multiple statements (adds one valid statement)
324
     * @param bool $validactor if the actor used is valid
324
     * @param bool $validactor if the actor used is valid
325
     * @param bool $validverb if the verb used is valid
325
     * @param bool $validverb if the verb used is valid
326
     * @param array $expected expected results
326
     * @param array $expected expected results
327
     */
327
     */
328
    public function test_statements_group(bool $multiple, bool $validactor, bool $validverb, array $expected) {
328
    public function test_statements_group(bool $multiple, bool $validactor, bool $validverb, array $expected): void {
329
        global $USER, $CFG;
329
        global $USER, $CFG;
Línea 330... Línea 330...
330
 
330
 
Línea 331... Línea 331...
331
        $this->resetAfterTest();
331
        $this->resetAfterTest();
Línea 416... Línea 416...
416
     * @dataProvider group_statement_provider
416
     * @dataProvider group_statement_provider
417
     * @param bool $usegroup1 if the 1st statement must be groupal
417
     * @param bool $usegroup1 if the 1st statement must be groupal
418
     * @param bool $usegroup2 if the 2nd statement must be groupal
418
     * @param bool $usegroup2 if the 2nd statement must be groupal
419
     * @param array $expected expected results
419
     * @param array $expected expected results
420
     */
420
     */
421
    public function test_group_disabled(bool $usegroup1, bool $usegroup2, array $expected) {
421
    public function test_group_disabled(bool $usegroup1, bool $usegroup2, array $expected): void {
422
        global $USER;
422
        global $USER;
Línea 423... Línea 423...
423
 
423
 
Línea 424... Línea 424...
424
        $this->resetAfterTest();
424
        $this->resetAfterTest();
Línea 471... Línea 471...
471
     * Test posting a statements batch not accepted by handler.
471
     * Test posting a statements batch not accepted by handler.
472
     *
472
     *
473
     * If all statements from a batch are rejectes by the plugin the full
473
     * If all statements from a batch are rejectes by the plugin the full
474
     * batch is considered rejected and an exception is returned.
474
     * batch is considered rejected and an exception is returned.
475
     */
475
     */
476
    public function test_full_batch_rejected() {
476
    public function test_full_batch_rejected(): void {
477
        $this->resetAfterTest();
477
        $this->resetAfterTest();
Línea 478... Línea 478...
478
 
478
 
Línea 479... Línea 479...
479
        $this->setAdminUser();
479
        $this->setAdminUser();