LoaderTest.php 882 B

12345678910111213141516171819202122232425262728293031
  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. class ProjectLoader1 extends Loader
  13. {
  14. public function load($resource)
  15. {
  16. }
  17. }
  18. class LoaderTest extends \PHPUnit_Framework_TestCase
  19. {
  20. public function testExtension()
  21. {
  22. ProjectLoader1::registerExtension($extension = new \ProjectExtension());
  23. $this->assertTrue(ProjectLoader1::getExtension('project') === $extension, '::registerExtension() registers an extension');
  24. }
  25. }