Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 50... Línea 50...
50
    /**
50
    /**
51
     * Test that different checksum algorithm work
51
     * Test that different checksum algorithm work
52
     *
52
     *
53
     * @return void
53
     * @return void
54
     */
54
     */
55
    public function test_get_checksum() {
55
    public function test_get_checksum(): void {
56
        $this->resetAfterTest();
56
        $this->resetAfterTest();
57
        foreach (['SHA1', 'SHA512', 'SHA256'] as $algo) {
57
        foreach (['SHA1', 'SHA512', 'SHA256'] as $algo) {
58
            set_config('bigbluebuttonbn_checksum_algorithm', $algo);
58
            set_config('bigbluebuttonbn_checksum_algorithm', $algo);
59
            $xmlinfo = self::get_status();
59
            $xmlinfo = self::get_status();
60
            $this->assertNotEmpty($xmlinfo);
60
            $this->assertNotEmpty($xmlinfo);
Línea 65... Línea 65...
65
    /**
65
    /**
66
     * Test that we send a checksumError whenever the algorithm is not supported
66
     * Test that we send a checksumError whenever the algorithm is not supported
67
     *
67
     *
68
     * @return void
68
     * @return void
69
     */
69
     */
70
    public function test_get_checksum_not_supported() {
70
    public function test_get_checksum_not_supported(): void {
71
        $this->resetAfterTest();
71
        $this->resetAfterTest();
72
        $bbbgenerator = $this->getDataGenerator()->get_plugin_generator('mod_bigbluebuttonbn');
72
        $bbbgenerator = $this->getDataGenerator()->get_plugin_generator('mod_bigbluebuttonbn');
73
        $bbbgenerator->set_value('checksum_algorithms', ['SHA1', 'SHA256']);
73
        $bbbgenerator->set_value('checksum_algorithms', ['SHA1', 'SHA256']);
74
        // This should not be supported.
74
        // This should not be supported.
75
        set_config('bigbluebuttonbn_checksum_algorithm', 'SHA512');
75
        set_config('bigbluebuttonbn_checksum_algorithm', 'SHA512');