mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Tests: Simplify the data provider for testing whether KSES globals are defined.
To avoid duplicating array values as keys when using a named data provider, the `text_array_to_dataprovider()` helper method can be used. Follow-up to [52229], [53521]. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54203 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bbb02f69ad
commit
559c8205cf
@ -2090,19 +2090,13 @@ HTML;
|
||||
* @return array
|
||||
*/
|
||||
public function data_kses_globals_are_defined() {
|
||||
return array(
|
||||
'allowedposttags' => array(
|
||||
'global' => 'allowedposttags',
|
||||
),
|
||||
'allowedtags' => array(
|
||||
'global' => 'allowedtags',
|
||||
),
|
||||
'allowedentitynames' => array(
|
||||
'global' => 'allowedentitynames',
|
||||
),
|
||||
'allowedxmlentitynames' => array(
|
||||
'global' => 'allowedxmlentitynames',
|
||||
),
|
||||
$globals = array(
|
||||
'allowedposttags',
|
||||
'allowedtags',
|
||||
'allowedentitynames',
|
||||
'allowedxmlentitynames',
|
||||
);
|
||||
|
||||
return $this->text_array_to_dataprovider( $globals );
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user