Code Duplication    Length = 8-8 lines in 2 locations

tests/test-ao.php 2 locations

@@ 1294-1301 (lines=8) @@
1291
        }, 10, 2 );
1292
1293
        // For test purposes, ALL images in the css are being inline with a 1x1 trans png string/datauri.
1294
        add_filter( 'autoptimize_filter_css_datauri_image', function( $base64array, $path ) {
1295
            $head = 'data:image/png;base64,';
1296
            $data = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
1297
1298
            $result['full']       = $head . $data;
1299
            $result['base64data'] = $data;
1300
            return $result;
1301
        }, 10, 2 );
1302
1303
        $instance = new autoptimizeStyles( $css_orig );
1304
        $instance->setOption( 'datauris', true );
@@ 1378-1385 (lines=8) @@
1375
        }, 10, 2 );
1376
1377
        // For test purposes, ALL images in the css are being inlined with a 1x1 trans png string/datauri.
1378
        add_filter( 'autoptimize_filter_css_datauri_image', function( $base64array, $path ) {
1379
            $head = 'data:image/png;base64,';
1380
            $data = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
1381
1382
            $result['full']       = $head . $data;
1383
            $result['base64data'] = $data;
1384
            return $result;
1385
        }, 10, 2 );
1386
1387
        $instance = new autoptimizeStyles( $css_orig );
1388
        $instance->setOption( 'datauris', true );