Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix test code #8291

Merged
merged 2 commits into from
Dec 6, 2023
Merged

test: fix test code #8291

merged 2 commits into from
Dec 6, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Dec 4, 2023

Description

  • fix Psalm error
  • fix Class not found

Checklist:

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

Error: tests/system/Test/TestCaseTest.php:57:56: UndefinedVariable: Cannot find referenced variable $result (see https://psalm.dev/024)
$ vendor/bin/phpunit tests/system/Test/TestCaseTest.php
PHPUnit 9.6.15 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.26
Configuration: /.../CodeIgniter4/phpunit.xml

E........                                                                                                 9 / 9 (100%)

Time: 00:00.086, Memory: 16.00 MB

There was 1 error:

1) CodeIgniter\Test\TestCaseTest::testGetPrivatePropertyWithObject
Error: Class "CodeIgniter\Test\__TestForReflectionHelper" not found

/.../CodeIgniter4/tests/system/Test/TestCaseTest.php:38

ERRORS!
Tests: 9, Assertions: 19, Errors: 1.
@kenjis kenjis added the testing Pull requests that changes tests only label Dec 4, 2023
@kenjis
Copy link
Member Author

kenjis commented Dec 5, 2023

This fixes GitHub Action check failure. Review, first.

@kenjis kenjis merged commit 7a38206 into codeigniter4:develop Dec 6, 2023
57 checks passed
@kenjis kenjis deleted the fix-tests branch December 6, 2023 09:32
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