ProjectFixerConfigurationTest.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /*
  3. * This file is part of PHP CS Fixer.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. namespace PhpCsFixer\Tests\AutoReview;
  12. use PhpCsFixer\Console\ConfigurationResolver;
  13. use PHPUnit\Framework\TestCase;
  14. /**
  15. * @author SpacePossum
  16. *
  17. * @internal
  18. *
  19. * @coversNothing
  20. * @group auto-review
  21. */
  22. final class ProjectFixerConfigurationTest extends TestCase
  23. {
  24. public function testCreate()
  25. {
  26. /** @var \PhpCsFixer\Config $config */
  27. $config = require __DIR__.'/../../.php_cs.dist';
  28. $this->assertInstanceOf('PhpCsFixer\Config', $config);
  29. $this->assertEmpty($config->getCustomFixers());
  30. $this->assertNotEmpty($config->getRules());
  31. // call so the fixers get configured to reveal issue (like deprecated configuration used etc.)
  32. $resolver = new ConfigurationResolver($config, [], __DIR__);
  33. $resolver->getFixers();
  34. }
  35. }