From cf4150f1a96f125204326ad46a3da202c792ecc9 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Sat, 27 Jul 2019 04:34:09 +0200
Subject: [PATCH] [tests] Remove work-arounds for str_getcsv()
---
tests/phpunit/includes/utils.php | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php
index 9a03250f6a..8fa1acd9aa 100644
|
a
|
b
|
function mask_input_value( $in, $name = '_wpnonce' ) { |
| 372 | 372 | return preg_replace( '@<input([^>]*) name="' . preg_quote( $name ) . '"([^>]*) value="[^>]*" />@', '<input$1 name="' . preg_quote( $name ) . '"$2 value="***" />', $in ); |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | | if ( ! function_exists( 'str_getcsv' ) ) { |
| 376 | | function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = '\\' ) { |
| 377 | | $fp = fopen( 'php://temp/', 'r+' ); |
| 378 | | fputs( $fp, $input ); |
| 379 | | rewind( $fp ); |
| 380 | | $data = fgetcsv( $fp, strlen( $input ), $delimiter, $enclosure ); |
| 381 | | fclose( $fp ); |
| 382 | | return $data; |
| 383 | | } |
| 384 | | } |
| 385 | | |
| 386 | 375 | /** |
| 387 | 376 | * Removes the post type and its taxonomy associations. |
| 388 | 377 | */ |