FinderTest.php 815 B

1234567891011121314151617181920212223242526272829303132333435
  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;
  12. use PhpCsFixer\Finder;
  13. use PHPUnit\Framework\TestCase;
  14. /**
  15. * @internal
  16. *
  17. * @covers \PhpCsFixer\Finder
  18. */
  19. final class FinderTest extends TestCase
  20. {
  21. public function testThatDefaultFinderDoesNotSpecifyAnyDirectory()
  22. {
  23. $this->setExpectedExceptionRegExp(
  24. 'LogicException',
  25. '/^You must call (?:the in\(\) method)|(?:one of in\(\) or append\(\)) methods before iterating over a Finder\.$/'
  26. );
  27. $finder = Finder::create();
  28. $finder->getIterator();
  29. }
  30. }