@@ -487,5 +487,139 @@ describe('Pest ProblemMatcher Text', () => {
487487 flowId : 57317 ,
488488 } ) ;
489489 } ) ;
490+
491+ it ( 'pest-v2 tests/Fixtures/CollisionTest.php' , ( ) => {
492+ resultShouldBe ( `##teamcity[testSuiteStarted name='Tests\\Fixtures\\CollisionTest' locationHint='file://tests/Fixtures/CollisionTest.php' flowId='57317']` , {
493+ event : TestResultEvent . testSuiteStarted ,
494+ id : 'tests/Fixtures/CollisionTest.php' ,
495+ testId : 'tests/Fixtures/CollisionTest.php' ,
496+ name : 'Tests\\Fixtures\\CollisionTest' ,
497+ file : 'tests/Fixtures/CollisionTest.php' ,
498+ flowId : 57317 ,
499+ } ) ;
500+
501+ resultShouldBe ( `##teamcity[testStarted name='success' locationHint='pest_qn://tests/Fixtures/CollisionTest.php::success' flowId='57317']` , {
502+ event : TestResultEvent . testStarted ,
503+ id : 'tests/Fixtures/CollisionTest.php::success' ,
504+ testId : 'tests/Fixtures/CollisionTest.php::success' ,
505+ name : 'success' ,
506+ file : 'tests/Fixtures/CollisionTest.php' ,
507+ flowId : 57317 ,
508+ } ) ;
509+
510+ resultShouldBe ( `##teamcity[testFinished name='success' duration='0' flowId='57317']` , {
511+ event : TestResultEvent . testFinished ,
512+ id : 'tests/Fixtures/CollisionTest.php::success' ,
513+ testId : 'tests/Fixtures/CollisionTest.php::success' ,
514+ name : 'success' ,
515+ file : 'tests/Fixtures/CollisionTest.php' ,
516+ flowId : 57317 ,
517+ } ) ;
518+
519+ resultShouldBe ( `##teamcity[testSuiteFinished name='Tests\\Fixtures\\CollisionTest' flowId='57317']` , {
520+ event : TestResultEvent . testSuiteFinished ,
521+ id : 'tests/Fixtures/CollisionTest.php' ,
522+ testId : 'tests/Fixtures/CollisionTest.php' ,
523+ name : 'Tests\\Fixtures\\CollisionTest' ,
524+ file : 'tests/Fixtures/CollisionTest.php' ,
525+ flowId : 57317 ,
526+ } ) ;
527+ } ) ;
528+ } ) ;
529+
530+ describe ( 'Pest v1' , ( ) => {
531+ it ( 'testStarted without flowId' , ( ) => {
532+ resultShouldBe ( `##teamcity[testSuiteStarted name='Tests\\Feature\\ExampleTest' locationHint='pest_qn://Tests\\Feature\\ExampleTest' flowId='58024']` , {
533+ event : TestResultEvent . testSuiteStarted ,
534+ id : 'Tests/Feature/ExampleTest' ,
535+ testId : 'Tests/Feature/ExampleTest' ,
536+ name : 'Tests\\Feature\\ExampleTest' ,
537+ flowId : 58024 ,
538+ } ) ;
539+
540+ resultShouldBe ( `##teamcity[testStarted name='test_example' locationHint='php_qn://${ pestProject ( 'tests/Feature/ExampleTest.php' ) } ::\\Tests\\Feature\\ExampleTest::test_example']` , {
541+ event : TestResultEvent . testStarted ,
542+ id : 'Example (Tests\\Feature\\Example)::Example' ,
543+ testId : 'Example (Tests\\Feature\\Example)::Example' ,
544+ name : 'test_example' ,
545+ flowId : 58024 ,
546+ } ) ;
547+
548+ resultShouldBe ( `##teamcity[testFinished name='test_example' duration='1' flowId='58024']` , {
549+ event : TestResultEvent . testFinished ,
550+ id : 'Example (Tests\\Feature\\Example)::Example' ,
551+ testId : 'Example (Tests\\Feature\\Example)::Example' ,
552+ name : 'test_example' ,
553+ flowId : 58024 ,
554+ } ) ;
555+
556+ resultShouldBe ( `##teamcity[testSuiteFinished name='Tests\\Feature\\ExampleTest' locationHint='pest_qn://Tests\\Feature\\ExampleTest' flowId='58024']` , {
557+ event : TestResultEvent . testSuiteFinished ,
558+ id : 'Tests/Feature/ExampleTest' ,
559+ testId : 'Tests/Feature/ExampleTest' ,
560+ name : 'Tests\\Feature\\ExampleTest' ,
561+ flowId : 58024 ,
562+ } ) ;
563+ } ) ;
564+
565+ it ( 'pest-v1 tests/Fixtures/CollisionTest.php' , ( ) => {
566+ resultShouldBe ( `##teamcity[testSuiteStarted name='Tests\\Fixtures\\CollisionTest' locationHint='pest_qn://${ pestProject ( 'tests/Fixtures/CollisionTest.php' ) } ' flowId='12667']` , {
567+ event : TestResultEvent . testSuiteStarted ,
568+ id : 'tests/Fixtures/CollisionTest.php' ,
569+ testId : 'tests/Fixtures/CollisionTest.php' ,
570+ name : 'Tests\\Fixtures\\CollisionTest' ,
571+ file : 'tests/Fixtures/CollisionTest.php' ,
572+ flowId : 12667 ,
573+ } ) ;
574+
575+
576+ resultShouldBe ( `##teamcity[testStarted name='error' locationHint='pest_qn://${ pestProject ( 'tests/Fixtures/CollisionTest.php' ) } ::error' flowId='12667']` , {
577+ event : TestResultEvent . testStarted ,
578+ id : 'tests/Fixtures/CollisionTest.php::error' ,
579+ testId : 'tests/Fixtures/CollisionTest.php::error' ,
580+ name : 'error' ,
581+ file : 'tests/Fixtures/CollisionTest.php' ,
582+ flowId : 12667 ,
583+ } ) ;
584+
585+ resultShouldBe ( `##teamcity[testIgnored name='error' message='' details=' /Users/recca0120/Desktop/vscode-phpunit/src/PHPUnit/__tests__/fixtures/pest-stub/tests/Fixtures/CollisionTest.php:5|n ' duration='6']` , undefined ) ;
586+
587+
588+ resultShouldBe ( `##teamcity[testFinished name='error' duration='6' flowId='12667']` , {
589+ event : TestResultEvent . testIgnored ,
590+ id : 'tests/Fixtures/CollisionTest.php::error' ,
591+ testId : 'tests/Fixtures/CollisionTest.php::error' ,
592+ name : 'error' ,
593+ file : 'tests/Fixtures/CollisionTest.php' ,
594+ flowId : 12667 ,
595+ } ) ;
596+
597+ resultShouldBe ( `##teamcity[testStarted name='success' locationHint='pest_qn://${ pestProject ( 'tests/Fixtures/CollisionTest.php' ) } ::success' flowId='12667']` , {
598+ event : TestResultEvent . testStarted ,
599+ id : 'tests/Fixtures/CollisionTest.php::success' ,
600+ testId : 'tests/Fixtures/CollisionTest.php::success' ,
601+ name : 'success' ,
602+ file : 'tests/Fixtures/CollisionTest.php' ,
603+ flowId : 12667 ,
604+ } ) ;
605+
606+ resultShouldBe ( `##teamcity[testFinished name='success' duration='0' flowId='12667']` , {
607+ event : TestResultEvent . testFinished ,
608+ id : 'tests/Fixtures/CollisionTest.php::success' ,
609+ testId : 'tests/Fixtures/CollisionTest.php::success' ,
610+ name : 'success' ,
611+ file : 'tests/Fixtures/CollisionTest.php' ,
612+ flowId : 12667 ,
613+ } ) ;
614+
615+ resultShouldBe ( `##teamcity[testSuiteFinished name='Tests\\Fixtures\\CollisionTest' locationHint='pest_qn://${ pestProject ( 'tests/Fixtures/CollisionTest.php' ) } ' flowId='12667']` , {
616+ event : TestResultEvent . testSuiteFinished ,
617+ id : 'tests/Fixtures/CollisionTest.php' ,
618+ testId : 'tests/Fixtures/CollisionTest.php' ,
619+ name : 'Tests\\Fixtures\\CollisionTest' ,
620+ file : 'tests/Fixtures/CollisionTest.php' ,
621+ flowId : 12667 ,
622+ } ) ;
623+ } ) ;
490624 } ) ;
491625} ) ;
0 commit comments