Skip to content

Commit 2c6271b

Browse files
committed
Improve code coverage
1 parent 4cfe451 commit 2c6271b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

plugins/embed-optimizer/hooks.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ function embed_optimizer_update_markup( WP_HTML_Tag_Processor $html_processor, b
191191
// As of 1.0.0-beta3, next_tag() allows $query and is beginning to migrate to skip tag closers by default.
192192
// In versions prior to this, the method always visited closers and passing a $query actually threw an exception.
193193
$tag_query = version_compare( OPTIMIZATION_DETECTIVE_VERSION, '1.0.0-beta3', '>=' )
194-
? array( 'tag_closers' => 'visit' )
195-
: null;
194+
? array( 'tag_closers' => 'visit' ) : null;
196195
try {
197196
/*
198197
* Determine how to lazy load the embed.

plugins/image-prioritizer/class-image-prioritizer-img-tag-visitor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ private function process_picture( OD_HTML_Tag_Processor $processor, OD_Tag_Visit
229229
// As of 1.0.0-beta3, next_tag() allows $query and is beginning to migrate to skip tag closers by default.
230230
// In versions prior to this, the method always visited closers and passing a $query actually threw an exception.
231231
$tag_query = version_compare( OPTIMIZATION_DETECTIVE_VERSION, '1.0.0-beta3', '>=' )
232-
? array( 'tag_closers' => 'visit' )
233-
: null;
232+
? array( 'tag_closers' => 'visit' ) : null;
234233
while ( $processor->next_tag( $tag_query ) ) {
235234
$tag = $processor->get_tag();
236235

plugins/optimization-detective/tests/test-optimization.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ public function data_provider_test_od_optimize_template_output_buffer(): array {
376376
* @covers OD_Visited_Tag_State::track_tag
377377
* @covers OD_Visited_Tag_State::is_tag_tracked
378378
* @covers OD_Visited_Tag_State::reset
379+
* @covers OD_HTML_Tag_Processor::is_admin_bar
379380
*
380381
* @dataProvider data_provider_test_od_optimize_template_output_buffer
381382
*

0 commit comments

Comments
 (0)