use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooClassWithEnumAttribute;
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooUnitEnum;
class PhpFileLoaderTest extends TestCase
{ use ExpectDeprecationTrait;
public function testSupports() { $loader =
new PhpFileLoader(new ContainerBuilder(),
new FileLocator());
$this->
assertTrue($loader->
supports('foo.php'
), '->supports() returns true if the resource is loadable'
);
$this->
assertFalse($loader->
supports('foo.foo'
), '->supports() returns false if the resource is not loadable'
);
$this->
assertTrue($loader->
supports('with_wrong_ext.yml', 'php'
), '->supports() returns true if the resource with forced type is loadable'
);
} public function testLoad() { $loader =
new PhpFileLoader($container =
new ContainerBuilder(),
new FileLocator());
$loader->
load(__DIR__.'/../Fixtures/php/simple.php'
);