@@ -64,6 +64,7 @@ public function test_videojs_enabled_true(): void {
64
64
$ this ->resetAfterTest (true );
65
65
66
66
$ filterplugin = new text_filter (null , []);
67
+ $ this ->resetDebugging ();
67
68
68
69
// We're testing a private method, so we need to setup reflector magic.
69
70
$ method = new ReflectionMethod ('\filter_smartmedia\text_filter ' , 'videojs_enabled ' );
@@ -83,6 +84,7 @@ public function test_videojs_enabled_false(): void {
83
84
media::set_enabled_plugins ('html5video ' );
84
85
85
86
$ filterplugin = new text_filter (null , []);
87
+ $ this ->resetDebugging ();
86
88
87
89
// We're testing a private method, so we need to setup reflector magic.
88
90
$ method = new ReflectionMethod ('\filter_smartmedia\text_filter ' , 'videojs_enabled ' );
@@ -99,6 +101,7 @@ public function test_videojs_enabled_false(): void {
99
101
public function test_get_smart_elements_no_smart (): void {
100
102
$ this ->resetAfterTest (true );
101
103
$ filterplugin = new text_filter (null , []);
104
+ $ this ->resetDebugging ();
102
105
103
106
$ linkhref = 'http://moodle.local/pluginfile.php/1461/mod_label/intro/SampleVideo1mb.mp4 ' ;
104
107
@@ -114,6 +117,7 @@ public function test_get_smart_elements_no_smart(): void {
114
117
public function test_get_embed_markup_simple (): void {
115
118
$ this ->resetAfterTest (true );
116
119
$ filterplugin = new text_filter (null , []);
120
+ $ this ->resetDebugging ();
117
121
118
122
$ linkhref = 'http://moodle.local/pluginfile.php/1461/mod_label/intro/OriginalVideo.mp4 ' ;
119
123
$ urls = [new url ('http://moodle.local/pluginfile.php/1461/mod_label/intro/SampleVideo1mb.m3u8 ' )];
@@ -145,7 +149,9 @@ public function test_get_embed_markup_simple(): void {
145
149
public function test_text_filter_filter_no_replace (): void {
146
150
$ this ->resetAfterTest (true );
147
151
$ filterplugin = new text_filter (null , []);
152
+ $ this ->resetDebugging ();
148
153
154
+ $ this ->resetDebugging ();
149
155
$ inputtext = '<div class="no-overflow"> '
150
156
.'<a href="#">Some test data</a> '
151
157
.'<a href="#">Some other test data</a> '
@@ -163,6 +169,7 @@ public function test_get_placeholder_markkup(): void {
163
169
164
170
global $ DB ;
165
171
$ filterplugin = new text_filter (null , []);
172
+ $ this ->resetDebugging ();
166
173
167
174
$ linkhref = 'http://moodle.local/pluginfile.php/1461/mod_label/intro/SampleVideo1mb.avi ' ;
168
175
$ fulltext = '<div class="no-overflow"> '
@@ -515,6 +522,7 @@ public function test_filter_replace($text, $regex, $matchcount, $mediaplugincoun
515
522
$ PAGE ->set_url (new url ($ pageurl ));
516
523
517
524
$ filterplugin = new text_filter (null , [], $ conversion );
525
+ $ this ->resetDebugging ();
518
526
$ result = $ filterplugin ->filter ($ text );
519
527
$ this ->assertEquals ($ matchcount , preg_match_all ($ regex , $ result ));
520
528
@@ -546,6 +554,7 @@ public function test_view_source(): void {
546
554
$ PAGE ->set_url (new url ("/my/ " ));
547
555
548
556
$ filterplugin = new text_filter (null , [], $ conversion );
557
+ $ this ->resetDebugging ();
549
558
$ text = '<div><div><video><source src="url.com/pluginfile.php/fake.mp4"/></video></div></div> ' ;
550
559
$ result = $ filterplugin ->filter ($ text );
551
560
$ this ->assertMatchesRegularExpression ('/<button.*View source media.*<\/button>/ ' , $ result );
@@ -571,6 +580,7 @@ public function test_view_optimised(): void {
571
580
$ SESSION ->local_smartmedia_viewsource = [sha1 ('url.com/pluginfile.php/fake.mp4 ' ) => true ];
572
581
573
582
$ filterplugin = new text_filter (null , [], $ conversion );
583
+ $ this ->resetDebugging ();
574
584
$ result = $ filterplugin ->filter ($ text );
575
585
$ this ->assertMatchesRegularExpression ('/<button.*View optimised media.*<\/button>/ ' , $ result );
576
586
}
0 commit comments