* * 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:----lgJc3XL45kbWjmF568ycFlZ1ERzhG/rL2iCpi4nKay1vkm8Uedfw711p9hX6QIaL78aCHOQ9VyDYlYi0ZC3CGzxEiWYHNEAoYRDn5anD7xYboIRCbWrQ5yNNQhGL53S+OYa5h0kJrjUToeotOdpnSkAKV35TGstfFRnynWLnBnytHZ9QbWE8aTP4Mkf0pfJyGP7isD/TYMeEq/WsOBhzmkh/EVIEj44uxSE8ILvde7N3hnODYo3YXaMr97baJ7y4tpdl/KdzjVFMaosllGUi1ppjXhfTOUNXdbtJbBZd3sLzwoK322y7ysZcPCpM4wz9OHrTxhuy1xEYkVUa32ssVbo+CDv+vaZ47xkBTUWrSLY0SqY3zhhRCNO6+3iLUnA9VGNYGwTk9mYwniGboenuRW8UexoYp5ykVCYyXcPl9IFbZFvoi4XQ7KJ4RZxP5BKzfa0JwRwTAhSAV6rb3YMrQ14GeJ22h5JdngMSgzGZgHQ18xEFaJ9dTDN7ZrNYf6tNd58E3kp/iO5wS2J8CE4/8tE3x+9rMyrR8akX+FZY3+Q07iJ6Z6ieV1vumZEn44bCcClWbbrCHbOqhARtwBa6ipiqZFCzZivAGLqEtBrRuVT758GxcC5CxuQHgYfjYLQmqt5/fAQ8aAm7l1XqdG8DN9X/zEGuNNeBwXeMhXcvCCY=----ATTACHMENT:----MzIxMjc1MDAyNDI2MzAxMyAxNzAyMDY1NzAyNzYyMDMwIDI5MTk3MzQ4ODgwNDY2OQ==