Skip to content

Commit fece676

Browse files
Merge branch '4.1'
* 4.1: Fixed typo Fix ini_get() for boolean values SCA: fixed broken tests SCA: applied code style as per guidelines SCA: minor code tweaks
2 parents d278f8a + 4dd9125 commit fece676

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ public function testPrototype()
611611
$resources = $container->getResources();
612612

613613
$fixturesDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR;
614-
$this->assertTrue(false !== array_search(new FileResource($fixturesDir.'xml'.\DIRECTORY_SEPARATOR.'services_prototype.xml'), $resources));
614+
$this->assertContains((string) new FileResource($fixturesDir.'xml'.\DIRECTORY_SEPARATOR.'services_prototype.xml'), $resources);
615615

616616
$prototypeRealPath = \realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'Prototype');
617617
$globResource = new GlobResource(
@@ -624,7 +624,7 @@ public function testPrototype()
624624
str_replace(\DIRECTORY_SEPARATOR, '/', $prototypeRealPath.\DIRECTORY_SEPARATOR.'BadClasses') => true,
625625
)
626626
);
627-
$this->assertTrue(false !== array_search($globResource, $resources));
627+
$this->assertContains((string) $globResource, $resources);
628628
$resources = array_map('strval', $resources);
629629
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
630630
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
@@ -643,7 +643,7 @@ public function testPrototypeExcludeWithArray()
643643
$resources = $container->getResources();
644644

645645
$fixturesDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR;
646-
$this->assertTrue(false !== array_search(new FileResource($fixturesDir.'xml'.\DIRECTORY_SEPARATOR.'services_prototype_array.xml'), $resources));
646+
$this->assertContains((string) new FileResource($fixturesDir.'xml'.\DIRECTORY_SEPARATOR.'services_prototype_array.xml'), $resources);
647647

648648
$prototypeRealPath = realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'Prototype');
649649
$globResource = new GlobResource(
@@ -656,7 +656,7 @@ public function testPrototypeExcludeWithArray()
656656
str_replace(\DIRECTORY_SEPARATOR, '/', $prototypeRealPath.\DIRECTORY_SEPARATOR.'OtherDir') => true,
657657
)
658658
);
659-
$this->assertTrue(false !== array_search($globResource, $resources));
659+
$this->assertContains((string) $globResource, $resources);
660660
$resources = array_map('strval', $resources);
661661
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
662662
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);

Tests/Loader/YamlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ public function testPrototype()
364364
$resources = $container->getResources();
365365

366366
$fixturesDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR;
367-
$this->assertTrue(false !== array_search(new FileResource($fixturesDir.'yaml'.\DIRECTORY_SEPARATOR.'services_prototype.yml'), $resources));
367+
$this->assertContains((string) new FileResource($fixturesDir.'yaml'.\DIRECTORY_SEPARATOR.'services_prototype.yml'), $resources);
368368

369369
$prototypeRealPath = \realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'Prototype');
370370
$globResource = new GlobResource(
@@ -376,7 +376,7 @@ public function testPrototype()
376376
str_replace(\DIRECTORY_SEPARATOR, '/', $prototypeRealPath.\DIRECTORY_SEPARATOR.'OtherDir') => true,
377377
)
378378
);
379-
$this->assertTrue(false !== array_search($globResource, $resources));
379+
$this->assertContains((string) $globResource, $resources);
380380
$resources = array_map('strval', $resources);
381381
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
382382
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);

0 commit comments

Comments
 (0)