LoaderTest.php 1.0 KB

1234567891011121314151617181920212223242526272829303132
  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. namespace Symfony\Tests\Components\DependencyInjection\Loader;
  10. require_once __DIR__.'/../../../../../fixtures/Symfony/Components/DependencyInjection/includes/ProjectExtension.php';
  11. use Symfony\Components\DependencyInjection\Loader\Loader;
  12. use Symfony\Components\DependencyInjection\BuilderConfiguration;
  13. class ProjectLoader1 extends Loader
  14. {
  15. public function load($resource, $main = true, BuilderConfiguration $configuration = null)
  16. {
  17. }
  18. }
  19. class LoaderTest extends \PHPUnit_Framework_TestCase
  20. {
  21. public function testExtension()
  22. {
  23. ProjectLoader1::registerExtension($extension = new \ProjectExtension());
  24. $this->assertTrue(ProjectLoader1::getExtension('project') === $extension, '::registerExtension() registers an extension');
  25. }
  26. }