Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 30... Línea 30...
30
 */
30
 */
31
class base_block_test extends \advanced_testcase {
31
class base_block_test extends \advanced_testcase {
32
    /**
32
    /**
33
     * Tests getting the name out of the class name.
33
     * Tests getting the name out of the class name.
34
     */
34
     */
35
    public function test_get_block_name() {
35
    public function test_get_block_name(): void {
36
        $area = new \block_mockblock\search\area();
36
        $area = new \block_mockblock\search\area();
37
        $this->assertEquals('mockblock', $area->get_block_name());
37
        $this->assertEquals('mockblock', $area->get_block_name());
38
    }
38
    }
Línea 39... Línea 39...
39
 
39
 
40
    /**
40
    /**
41
     * Tests getting the recordset.
41
     * Tests getting the recordset.
42
     */
42
     */
43
    public function test_get_document_recordset() {
43
    public function test_get_document_recordset(): void {
Línea 44... Línea 44...
44
        global $DB, $USER;
44
        global $DB, $USER;
45
 
45
 
Línea 243... Línea 243...
243
    }
243
    }
Línea 244... Línea 244...
244
 
244
 
245
    /**
245
    /**
246
     * Tests the get_doc_url function.
246
     * Tests the get_doc_url function.
247
     */
247
     */
248
    public function test_get_doc_url() {
248
    public function test_get_doc_url(): void {
Línea 249... Línea 249...
249
        global $DB;
249
        global $DB;
Línea 250... Línea 250...
250
 
250
 
Línea 325... Línea 325...
325
    }
325
    }
Línea 326... Línea 326...
326
 
326
 
327
    /**
327
    /**
328
     * Tests the check_access function.
328
     * Tests the check_access function.
329
     */
329
     */
330
    public function test_check_access() {
330
    public function test_check_access(): void {
Línea 331... Línea 331...
331
        global $DB;
331
        global $DB;
Línea 332... Línea 332...
332
 
332
 
Línea 380... Línea 380...
380
 
380
 
381
    /**
381
    /**
382
     * Tests the block version of get_contexts_to_reindex, which is supposed to return all the
382
     * Tests the block version of get_contexts_to_reindex, which is supposed to return all the
383
     * block contexts in order of date added.
383
     * block contexts in order of date added.
384
     */
384
     */
385
    public function test_get_contexts_to_reindex() {
385
    public function test_get_contexts_to_reindex(): void {
Línea 386... Línea 386...
386
        global $DB;
386
        global $DB;
Línea 387... Línea 387...
387
 
387
 
Línea 440... Línea 440...
440
    }
440
    }
Línea 441... Línea 441...
441
 
441
 
442
    /**
442
    /**
443
     * Test document icon.
443
     * Test document icon.
444
     */
444
     */
445
    public function test_get_doc_icon() {
445
    public function test_get_doc_icon(): void {
446
        $baseblock = $this->getMockBuilder('\core_search\base_block')
446
        $baseblock = $this->getMockBuilder('\core_search\base_block')
447
            ->disableOriginalConstructor()
447
            ->disableOriginalConstructor()
Línea 448... Línea 448...
448
            ->getMockForAbstractClass();
448
            ->getMockForAbstractClass();