alias(function (array $defaults, array $atts): array { return array_merge($defaults, array_intersect_key($atts, $defaults)); }); Helpers::reset_cache(); ShortcodeDmr::reset_cache(); } protected function tearDown(): void { unset( $_SERVER['REQUEST_URI'], $GLOBALS['wp_query'], $GLOBALS['wp_the_query'], $GLOBALS['post'] ); try { Monkey\tearDown(); } finally { // Patchwork routes MUST be disconnected even when Monkey\tearDown() throws // (e.g. Mockery count validation failure). If they are not, any // when('function_exists')->alias() from the failed test stays active and // causes "Cannot redeclare function __()..." in the next test's setUp(). \Patchwork\restoreAll(); } parent::tearDown(); } }