Skip to content

test: move tests to the CodeIgniter\Shield\Tests namespace - #1405

Merged
datamweb merged 1 commit into
codeigniter4:developfrom
paulbalandan:tests-namespace
Nov 14, 2026
Merged

datamweb merged 1 commit into
codeigniter4:developfrom
paulbalandan:tests-namespace

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
Closes the proposal in #1399.

The test namespace was Tests\, which PHPStan treats as a different root from CodeIgniter\. Any test calling a framework class marked @internal (for example CodeIgniter\Superglobals) was flagged and baselined. Moving the tests under CodeIgniter\Shield\Tests\ puts them in the same root as the framework, so those errors no longer occur.

  • Additionally, Tests\Support is exclusive for fixtures, thus, the two test cases and trait are moved to the tests root.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@datamweb datamweb added the testing Pull requests that changes tests only label Nov 13, 2026

@datamweb datamweb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please rebase and resolve the conflicts?

@datamweb

Copy link
Copy Markdown
Collaborator

Thanks @paulbalandan.

@datamweb
datamweb merged commit ce7ec48 into codeigniter4:develop Nov 14, 2026
38 checks passed
@paulbalandan
paulbalandan deleted the tests-namespace branch November 14, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Pull requests that changes tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants