File tree Expand file tree Collapse file tree
packages/phpunit/src/TestCollection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import { TestIdentifierFactory } from '../TestIdentifier/TestIdentifierFactory';
33import { createDatasetDefinition } from '../TestParser/TestDefinitionBuilder' ;
44import { type TestDefinition , TestType } from '../types' ;
55
6+ const GROUP_TAG_PREFIX = 'group' ;
7+
68export interface ItemCollection < T > {
79 get ( id : string ) : T | undefined ;
810 add ( item : T ) : void ;
@@ -217,7 +219,9 @@ export abstract class TestHierarchyBuilder<T extends TestTreeItem<T>> {
217219 }
218220
219221 private inheritParentTags ( testItem : T , parentItem : T ) {
220- const parentTags = ( parentItem . tags ?? [ ] ) . filter ( ( t ) => t . id . startsWith ( 'group:' ) ) ;
222+ const parentTags = ( parentItem . tags ?? [ ] ) . filter ( ( t ) =>
223+ t . id . startsWith ( `${ GROUP_TAG_PREFIX } :` ) ,
224+ ) ;
221225 if ( parentTags . length === 0 ) {
222226 return ;
223227 }
@@ -245,7 +249,7 @@ export abstract class TestHierarchyBuilder<T extends TestTreeItem<T>> {
245249
246250 const groups = ( testDefinition . annotations ?. group as string [ ] ) ?? [ ] ;
247251 for ( const g of groups ) {
248- tags . push ( this . createTag ( `group :${ g } ` ) ) ;
252+ tags . push ( this . createTag ( `${ GROUP_TAG_PREFIX } :${ g } ` ) ) ;
249253 }
250254
251255 if ( testDefinition . testsuite ) {
You can’t perform that action at this time.
0 commit comments