Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 32... Línea 32...
32
 * @copyright  2015 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
32
 * @copyright  2015 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
33
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 */
34
 */
35
class restore_log_rule_test extends \basic_testcase {
35
class restore_log_rule_test extends \basic_testcase {
Línea 36... Línea 36...
36
 
36
 
Línea 37... Línea 37...
37
    function test_process_keeps_log_unmodified() {
37
    function test_process_keeps_log_unmodified(): void {
38
 
38
 
39
        // Prepare a tiny log entry.
39
        // Prepare a tiny log entry.
40
        $originallog = new \stdClass();
40
        $originallog = new \stdClass();
Línea 52... Línea 52...
52
 
52
 
53
        // But the original log has been kept unmodified by the process() call.
53
        // But the original log has been kept unmodified by the process() call.
54
        $this->assertEquals($originallog, $log);
54
        $this->assertEquals($originallog, $log);
Línea 55... Línea 55...
55
    }
55
    }
56
 
56
 
57
    public function test_build_regexp() {
57
    public function test_build_regexp(): void {
Línea 58... Línea 58...
58
        $original = 'Any (string) with [placeholders] like {this} and {this}. [end].';
58
        $original = 'Any (string) with [placeholders] like {this} and {this}. [end].';
59
        $expectation = '~Any \(string\) with (.*) like (.*) and (.*)\. (.*)\.~';
59
        $expectation = '~Any \(string\) with (.*) like (.*) and (.*)\. (.*)\.~';