@@ -611,7 +611,19 @@ public function testPrototype()
611
611
612
612
$ fixturesDir = \dirname (__DIR__ ).\DIRECTORY_SEPARATOR .'Fixtures ' .\DIRECTORY_SEPARATOR ;
613
613
$ this ->assertTrue (false !== array_search (new FileResource ($ fixturesDir .'xml ' .\DIRECTORY_SEPARATOR .'services_prototype.xml ' ), $ resources ));
614
- $ this ->assertTrue (false !== array_search (new GlobResource ($ fixturesDir .'Prototype ' , '/* ' , true ), $ resources ));
614
+
615
+ $ prototypeRealPath = \realpath (__DIR__ .\DIRECTORY_SEPARATOR .'.. ' .\DIRECTORY_SEPARATOR .'Fixtures ' .\DIRECTORY_SEPARATOR .'Prototype ' );
616
+ $ globResource = new GlobResource (
617
+ $ fixturesDir .'Prototype ' ,
618
+ '/* ' ,
619
+ true ,
620
+ false ,
621
+ array (
622
+ str_replace (\DIRECTORY_SEPARATOR , '/ ' , $ prototypeRealPath .\DIRECTORY_SEPARATOR .'OtherDir ' ) => true ,
623
+ str_replace (\DIRECTORY_SEPARATOR , '/ ' , $ prototypeRealPath .\DIRECTORY_SEPARATOR .'BadClasses ' ) => true ,
624
+ )
625
+ );
626
+ $ this ->assertTrue (false !== array_search ($ globResource , $ resources ));
615
627
$ resources = array_map ('strval ' , $ resources );
616
628
$ this ->assertContains ('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo ' , $ resources );
617
629
$ this ->assertContains ('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar ' , $ resources );
@@ -631,7 +643,19 @@ public function testPrototypeExcludeWithArray()
631
643
632
644
$ fixturesDir = \dirname (__DIR__ ).\DIRECTORY_SEPARATOR .'Fixtures ' .\DIRECTORY_SEPARATOR ;
633
645
$ this ->assertTrue (false !== array_search (new FileResource ($ fixturesDir .'xml ' .\DIRECTORY_SEPARATOR .'services_prototype_array.xml ' ), $ resources ));
634
- $ this ->assertTrue (false !== array_search (new GlobResource ($ fixturesDir .'Prototype ' , '/* ' , true ), $ resources ));
646
+
647
+ $ prototypeRealPath = realpath (__DIR__ .\DIRECTORY_SEPARATOR .'.. ' .\DIRECTORY_SEPARATOR .'Fixtures ' .\DIRECTORY_SEPARATOR .'Prototype ' );
648
+ $ globResource = new GlobResource (
649
+ $ fixturesDir .'Prototype ' ,
650
+ '/* ' ,
651
+ true ,
652
+ false ,
653
+ array (
654
+ str_replace (\DIRECTORY_SEPARATOR , '/ ' , $ prototypeRealPath .\DIRECTORY_SEPARATOR .'BadClasses ' ) => true ,
655
+ str_replace (\DIRECTORY_SEPARATOR , '/ ' , $ prototypeRealPath .\DIRECTORY_SEPARATOR .'OtherDir ' ) => true ,
656
+ )
657
+ );
658
+ $ this ->assertTrue (false !== array_search ($ globResource , $ resources ));
635
659
$ resources = array_map ('strval ' , $ resources );
636
660
$ this ->assertContains ('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo ' , $ resources );
637
661
$ this ->assertContains ('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar ' , $ resources );
0 commit comments