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

PHP Unit test case showing indirect error not showing exact line number in file. #5082

Closed
ashetkar011 opened this issue Oct 20, 2022 · 3 comments

Comments

@ashetkar011
Copy link

PHP UNIT VERSION: 9.5.25
PHP VERSION: 8.1
installed method: composer

Summary
While running phpunit test case getting indirect error like below
1x: strtr(): Passing null to parameter #1 ($string) of type string is deprecated
Using Command: /vendor/bin/phpunit -c core modules/custom/custom module/tests/src/Unit/Form/filename.php

Problem
Is there any way to get exact error line number or complete stack trace via command ?

@ashetkar011 ashetkar011 added the type/bug Something is broken label Oct 20, 2022
@sebastianbergmann
Copy link
Owner

Thank you for your report.

Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting.

Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue.

@sebastianbergmann sebastianbergmann added the status/waiting-for-feedback Waiting for feedback from original reporter label Oct 20, 2022
@ashetkar011
Copy link
Author

ashetkar011 commented Oct 20, 2022

Is there any general way to debug issue or get full stack trace via command?
As per updated php version 8.1 some string functions are showing deprecated error in unit test case file, I am getting indirect error for same It is hard located due to large number of files

@sebastianbergmann
Copy link
Owner

I cannot help you without a minimal, self-contained, reproducing test case that shows the problem you are reporting. You are not even showing a complete message. If 1x: strtr(): Passing null to parameter https://github.com/sebastianbergmann/phpunit/issues/1 ($string) of type string is deprecated is part of the output you see then I have to tell you that this does not come from PHPUnit. Are you using Symfony and its PHPUnit Bridge perhaps?

@sebastianbergmann sebastianbergmann removed type/bug Something is broken status/waiting-for-feedback Waiting for feedback from original reporter labels Nov 11, 2022
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

No branches or pull requests

2 participants