Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 227... Línea 227...
227
EOD;
227
EOD;
Línea 228... Línea 228...
228
 
228
 
229
    /**
229
    /**
230
     * Test for the area assign intro
230
     * Test for the area assign intro
231
     */
231
     */
232
    public function test_check() {
232
    public function test_check(): void {
233
        $results = $this->get_checker_results($this->htmlfail1);
233
        $results = $this->get_checker_results($this->htmlfail1);
Línea 234... Línea 234...
234
        $this->assertTrue($results[0]->element->tagName == 'p');
234
        $this->assertTrue($results[0]->element->tagName == 'p');
235
 
235
 
Línea 253... Línea 253...
253
    }
253
    }
Línea 254... Línea 254...
254
 
254
 
255
    /**
255
    /**
256
     * Test with valid colour names.
256
     * Test with valid colour names.
257
     */
257
     */
258
    public function test_check_for_namedcolours() {
258
    public function test_check_for_namedcolours(): void {
259
        $results = $this->get_checker_results($this->namecolours);
259
        $results = $this->get_checker_results($this->namecolours);
260
        $this->assertTrue($results[0]->element->tagName == 'p');
260
        $this->assertTrue($results[0]->element->tagName == 'p');
Línea 261... Línea 261...
261
    }
261
    }
262
 
262
 
263
    /**
263
    /**
264
     * Test with invalid colour names.
264
     * Test with invalid colour names.
265
     */
265
     */
266
    public function test_check_for_invalidcolours() {
266
    public function test_check_for_invalidcolours(): void {
267
        $results = $this->get_checker_results($this->invalidcolours);
267
        $results = $this->get_checker_results($this->invalidcolours);
Línea 268... Línea 268...
268
        $this->assertTrue($results[0]->element->tagName == 'p');
268
        $this->assertTrue($results[0]->element->tagName == 'p');
269
    }
269
    }
270
 
270
 
271
    /**
271
    /**
272
     * Test with invalid colour numeric values.
272
     * Test with invalid colour numeric values.
273
     */
273
     */
274
    public function test_check_for_invalidvalues() {
274
    public function test_check_for_invalidvalues(): void {
Línea 275... Línea 275...
275
        $results = $this->get_checker_results($this->invalidvalue);
275
        $results = $this->get_checker_results($this->invalidvalue);
276
        $this->assertTrue($results[0]->element->tagName == 'p');
276
        $this->assertTrue($results[0]->element->tagName == 'p');
277
    }
277
    }
278
 
278
 
279
    /**
279
    /**
280
     * Test with empty colour values.
280
     * Test with empty colour values.
281
     */
281
     */
Línea 282... Línea 282...
282
    public function test_check_for_emptyvalues() {
282
    public function test_check_for_emptyvalues(): void {
283
        $results = $this->get_checker_results($this->emptyvalue);
283
        $results = $this->get_checker_results($this->emptyvalue);
284
        $this->assertEmpty($results);
284
        $this->assertEmpty($results);
285
    }
285
    }
286
 
286
 
287
    /**
287
    /**
288
     * Test for text px18 with insufficient contrast of 4.49.
288
     * Test for text px18 with insufficient contrast of 4.49.
Línea 289... Línea 289...
289
     */
289
     */
290
    public function test_check_for_px18_fail() {
290
    public function test_check_for_px18_fail(): void {
291
        $results = $this->get_checker_results($this->px18);
291
        $results = $this->get_checker_results($this->px18);
292
        $this->assertTrue($results[0]->element->tagName == 'p');
292
        $this->assertTrue($results[0]->element->tagName == 'p');
293
    }
293
    }
294
 
294
 
295
    /**
295
    /**
Línea 296... Línea 296...
296
     * Test for text px19 bold with sufficient contrast of 4.49.
296
     * Test for text px19 bold with sufficient contrast of 4.49.
297
     */
297
     */
298
    public function test_check_for_px19bold_pass() {
298
    public function test_check_for_px19bold_pass(): void {
299
        $results = $this->get_checker_results($this->px19bold);
299
        $results = $this->get_checker_results($this->px19bold);
300
        $this->assertEmpty($results);
300
        $this->assertEmpty($results);
301
    }
301
    }
302
 
302
 
Línea 303... Línea 303...
303
    /**
303
    /**
304
     * Test for text px18 with sufficient contrast of 4.81.
304
     * Test for text px18 with sufficient contrast of 4.81.
305
     */
305
     */
306
    public function test_check_for_px18_pass() {
306
    public function test_check_for_px18_pass(): void {
307
        $results = $this->get_checker_results($this->px18pass);
307
        $results = $this->get_checker_results($this->px18pass);
308
        $this->assertEmpty($results);
308
        $this->assertEmpty($results);
309
    }
309
    }
Línea 310... Línea 310...
310
 
310
 
311
    /**
311
    /**
312
     * Test for medium (12pt) text with insufficient contrast of 4.49.
312
     * Test for medium (12pt) text with insufficient contrast of 4.49.
313
     */
313
     */
314
    public function test_check_for_medium_fail() {
314
    public function test_check_for_medium_fail(): void {
315
        $results = $this->get_checker_results($this->mediumfail);
315
        $results = $this->get_checker_results($this->mediumfail);
316
        $this->assertTrue($results[0]->element->tagName == 'p');
316
        $this->assertTrue($results[0]->element->tagName == 'p');
Línea 317... Línea 317...
317
    }
317
    }
318
 
318
 
319
    /**
319
    /**
320
     * Test for medium (12pt) text with sufficient contrast of 4.81.
320
     * Test for medium (12pt) text with sufficient contrast of 4.81.
321
     */
321
     */
322
    public function test_check_for_medium_pass() {
322
    public function test_check_for_medium_pass(): void {
323
        $results = $this->get_checker_results($this->mediumpass);
323
        $results = $this->get_checker_results($this->mediumpass);
Línea 324... Línea 324...
324
        $this->assertEmpty($results);
324
        $this->assertEmpty($results);
325
    }
325
    }
326
 
326
 
327
    /**
327
    /**
328
     * Test for larger (14pt) text with insufficient contrast of 2.94.
328
     * Test for larger (14pt) text with insufficient contrast of 2.94.
329
     */
329
     */
330
    public function test_check_for_larger_fail() {
330
    public function test_check_for_larger_fail(): void {
Línea 331... Línea 331...
331
        $results = $this->get_checker_results($this->largerfail);
331
        $results = $this->get_checker_results($this->largerfail);
332
        $this->assertTrue($results[0]->element->tagName == 'p');
332
        $this->assertTrue($results[0]->element->tagName == 'p');
333
    }
333
    }
334
 
334
 
335
    /**
335
    /**
336
     * Test for larger (14pt) text with insufficient contrast of 3.02.
336
     * Test for larger (14pt) text with insufficient contrast of 3.02.
337
     */
337
     */
338
    public function test_check_for_larger_pass() {
338
    public function test_check_for_larger_pass(): void {