$ids =
array_keys(array_filter($container->
getDefinitions(),
fn ($def) => !
$def->
hasTag('container.excluded'
)));
sort($ids);
$this->
assertSame([Prototype\Foo::
class, Prototype\Sub\Bar::
class, 'service_container'
],
$ids);
$resources =
array_map('strval',
$container->
getResources());
$fixturesDir = \
dirname(__DIR__
).\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR;
$this->
assertContains((string) new FileResource($fixturesDir.'xml'.\DIRECTORY_SEPARATOR.'services_prototype.xml'
),
$resources);
$prototypeRealPath =
realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'Prototype'
);
$globResource =
new GlobResource( $fixturesDir.'Prototype',
'/*',
true,
false,
[ str_replace(\DIRECTORY_SEPARATOR, '/',
$prototypeRealPath.\DIRECTORY_SEPARATOR.'OtherDir'
) => true,
str_replace(\DIRECTORY_SEPARATOR, '/',
$prototypeRealPath.\DIRECTORY_SEPARATOR.'BadClasses'
) => true,
str_replace(\DIRECTORY_SEPARATOR, '/',
$prototypeRealPath.\DIRECTORY_SEPARATOR.'SinglyImplementedInterface'
) => true,
str_replace(\DIRECTORY_SEPARATOR, '/',
$prototypeRealPath.\DIRECTORY_SEPARATOR.'StaticConstructor'
) => true,
] );