LoaderTest.php 865 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. * This file is part of the symfony package.
  4. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. require_once __DIR__.'/../../../../bootstrap.php';
  10. use Symfony\Components\DependencyInjection\Loader\Loader;
  11. require_once __DIR__.'/../../../../../fixtures/Symfony/Components/DependencyInjection/includes/ProjectExtension.php';
  12. class ProjectLoader extends Loader
  13. {
  14. public function load($resource)
  15. {
  16. }
  17. }
  18. $t = new LimeTest(1);
  19. // ::registerExtension() ::getExtension()
  20. $t->diag('::registerExtension() ::getExtension()');
  21. ProjectLoader::registerExtension($extension = new ProjectExtension());
  22. $t->ok(ProjectLoader::getExtension('project') === $extension, '::registerExtension() registers an extension');