Code Duplication    Length = 8-8 lines in 2 locations

tests/test-ao.php 2 locations

@@ 1315-1322 (lines=8) @@
1312
        }, 10, 2 );
1313
1314
        // For test purposes, ALL images in the css are being inline with a 1x1 trans png string/datauri.
1315
        add_filter( 'autoptimize_filter_css_datauri_image', function( $base64array, $path ) {
1316
            $head = 'data:image/png;base64,';
1317
            $data = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
1318
1319
            $result['full']       = $head . $data;
1320
            $result['base64data'] = $data;
1321
            return $result;
1322
        }, 10, 2 );
1323
1324
        $instance = new autoptimizeStyles( $css_orig );
1325
        $instance->setOption( 'datauris', true );
@@ 1399-1406 (lines=8) @@
1396
        }, 10, 2 );
1397
1398
        // For test purposes, ALL images in the css are being inlined with a 1x1 trans png string/datauri.
1399
        add_filter( 'autoptimize_filter_css_datauri_image', function( $base64array, $path ) {
1400
            $head = 'data:image/png;base64,';
1401
            $data = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
1402
1403
            $result['full']       = $head . $data;
1404
            $result['base64data'] = $data;
1405
            return $result;
1406
        }, 10, 2 );
1407
1408
        $instance = new autoptimizeStyles( $css_orig );
1409
        $instance->setOption( 'datauris', true );