mheap / phpunit-matcher-action

Add annotations to your PHPUnit tests when running under Github Actions
32 stars 6 forks source link

Multiple source of the assertation not handled #18

Closed antalaron closed 1 year ago

antalaron commented 1 year ago

I have a problem. One of my test has nested cause of the failure. Eg.:

2) App\Tests\WebTest::testLogin
Failed asserting that Symfony\Component\Panther\DomCrawler\Crawler Object &0000000038b293090000000039caa08d (
...
/github/workspace/vendor/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php:46
/github/workspace/tests/WebTest.php:50

Because of this the line in the --teamcity looks like this:

##teamcity[testFailed name='testLogin' message='...' details=' /github/workspace/vendor/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php:46|n /github/workspace/tests/WebTest.php:50|n ' ...]

And the regexp only finds the first file, which is out of my scope, and the github cannot annotate the real problem.

mheap commented 1 year ago

I just merged #6 which should solve this