* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Tests\Loader; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Loader\LoaderResolver; class LoaderResolverTest extends TestCase { public function testConstructor() { $resolver = new LoaderResolver(array( $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(), )); $this->assertEquals(array($loader), $resolver->getLoaders(), '__construct() takes an array of loaders as its first argument'); } public function testResolve() { $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); $resolver = new LoaderResolver(array($loader)); $this->assertFalse($resolver->resolve('foo.foo'), '->resolve() returns false if no loader is able to load the resource'); $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); $loader->expects($this->once())->method('supports')->will($this->returnValue(true)); $resolver = new LoaderResolver(array($loader)); $this->assertEquals($loader, $resolver->resolve(function () {}), '->resolve() returns the loader for the given resource'); } public function testLoaders() { $resolver = new LoaderResolver(); $resolver->addLoader($loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock()); $this->assertEquals(array($loader), $resolver->getLoaders(), 'addLoader() adds a loader'); } } __halt_compiler();----SIGNATURE:----R9+c3jkxFzYiBLmuhDx3fZQf2BQhqF4oEAmMHptyzcKRf0jZWvUBRUlyv+VHzKlQu9zY+871h5sYMou+485D7Y7On3v2xXwEMhaWx+R+oVO9S9Iu3WFZBZMPk9fYe7CYQHDBVBSDoIdDckG5aHVa+uFstLnL2pjmvbHsGg9Yv+8z2ry9JZAR63EiPyZZoUZGSiWDIzaMLqOyVf18JCUOn92EtQVruhYoK7M/+S/0pQgE5uwZtlnjJ7kGvhpUzOcJQg6ksJUaNET1zXxto2K1Ge1Mf0kTG9LJLZqakf59SebHqkEV9kTXjh2RlFpREitbWorywI6Len1jSvQb69EIN0ehhcALuEQLyjqXed7H44nQQhNG5vn3t7TuKRlB8/8IHy2jwB4MfwIu7AjuX9h6KcxvXCSd1lr3QpOcDRYhCMi8nzoVFWZAb6xlYB3TZps/tlGbM+727FUYkd+g0qpm8cYp3fJZccs/od2YEZ5VxyJtw2uKTIzStavw5rn2XUTQStYaV2O9CHwT0TRpbuqrSRChikme5R4dGVQRRRS3hiothSsLc3oxHZOhT3s4MUfIwJXch8NnxBwT7XL7nndgN2SC+Bl1cUKvs7CNBfhD1g5ehXjhK3S7FNLxfWLsz3rYQgZ8TzdPtS75qWytlR4hWm4Khs+Mr+SsX5ykqYYLkRw=----ATTACHMENT:----NDcxMjE2OTAwMjYxMjUzMiAxNDYyMzc5MDIxMDk3NjIgOTgwNzc3NzgwOTI5ODk3NQ==