consistently use same types for strict comparisons

This commit is contained in:
Christian Flothmann 2020-09-08 10:26:11 +02:00
parent 12b419e481
commit afc11684e0
2 changed files with 3 additions and 6 deletions

View File

@ -675,7 +675,7 @@ class XmlFileLoaderTest extends TestCase
sort($ids);
$this->assertSame([Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids);
$resources = $container->getResources();
$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);
@ -693,7 +693,6 @@ class XmlFileLoaderTest extends TestCase
]
);
$this->assertContains((string) $globResource, $resources);
$resources = array_map('strval', $resources);
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
}
@ -708,7 +707,7 @@ class XmlFileLoaderTest extends TestCase
sort($ids);
$this->assertSame([Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids);
$resources = $container->getResources();
$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_array.xml'), $resources);
@ -726,7 +725,6 @@ class XmlFileLoaderTest extends TestCase
]
);
$this->assertContains((string) $globResource, $resources);
$resources = array_map('strval', $resources);
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
}

View File

@ -451,7 +451,7 @@ class YamlFileLoaderTest extends TestCase
sort($ids);
$this->assertSame([Prototype\Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids);
$resources = $container->getResources();
$resources = array_map('strval', $container->getResources());
$fixturesDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR;
$this->assertContains((string) new FileResource($fixturesDir.'yaml'.\DIRECTORY_SEPARATOR.'services_prototype.yml'), $resources);
@ -468,7 +468,6 @@ class YamlFileLoaderTest extends TestCase
]
);
$this->assertContains((string) $globResource, $resources);
$resources = array_map('strval', $resources);
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo', $resources);
$this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
}