Skip to content

Add unit tests for wp_make_plugin_file_tree() in wp-admin/includes/mi…#11724

Open
pbearne wants to merge 1 commit intoWordPress:trunkfrom
pbearne:65176-misc-wp_make_plugin_file_tree
Open

Add unit tests for wp_make_plugin_file_tree() in wp-admin/includes/mi…#11724
pbearne wants to merge 1 commit intoWordPress:trunkfrom
pbearne:65176-misc-wp_make_plugin_file_tree

Conversation

@pbearne
Copy link
Copy Markdown

@pbearne pbearne commented May 5, 2026

…sc.php
Description:
This PR adds unit tests for the wp_make_plugin_file_tree() function in wp-admin/includes/misc.php. These tests ensure that the function correctly converts a flat list of plugin file paths into a hierarchical tree structure, which is used for the file list in the plugin editor.

The tests cover:

  • Empty input list.
  • Flat list of files.
  • Nested directory structures.
  • Deeply nested file paths.
  • Handling of multiple plugins having files with the same relative name.

Trac ticket: https://core.trac.wordpress.org/ticket/65176

AI Disclosure:

  • AI assistance: Yes
  • Tool(s): Junie (JetBrains)
  • Model(s): gemini-3-flash-preview
  • Used for: Code analysis, test implementation, and workflow management.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @pbearne@git.wordpress.org.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant