LoaderTest.php 931 B

123456789101112131415161718192021222324252627282930313233
  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__.'/../../../bootstrap.php';
  11. require_once __DIR__.'/../../../../../fixtures/Symfony/Components/DependencyInjection/includes/ProjectExtension.php';
  12. use Symfony\Components\DependencyInjection\Loader\Loader;
  13. class ProjectLoader1 extends Loader
  14. {
  15. public function load($resource)
  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. }