Skip to content
Snippets Groups Projects
Commit bc1baf09 authored by Daniel Hürtgen's avatar Daniel Hürtgen
Browse files

TASK: Sort standards search by finder by name

parent ce2c94c4
No related merge requests found
...@@ -61,7 +61,8 @@ class Finder ...@@ -61,7 +61,8 @@ class Finder
$finder = $this->getSymfonyFinder() $finder = $this->getSymfonyFinder()
->in($path) ->in($path)
->files() ->files()
->name('ruleset.xml'); ->name('ruleset.xml')
->sortByName();
$paths = iterator_to_array($finder, false); $paths = iterator_to_array($finder, false);
$paths = array_map( $paths = array_map(
function (SplFileInfo $file) { function (SplFileInfo $file) {
......
...@@ -85,7 +85,7 @@ class FinderTest extends \PHPUnit_Framework_TestCase ...@@ -85,7 +85,7 @@ class FinderTest extends \PHPUnit_Framework_TestCase
$path . DIRECTORY_SEPARATOR . 'Standard1', $path . DIRECTORY_SEPARATOR . 'Standard1',
); );
$fluentMethods = array('in', 'files', 'name'); $fluentMethods = array('in', 'files', 'name', 'sortByName');
foreach ($fluentMethods as $fluentMethod) { foreach ($fluentMethods as $fluentMethod) {
$this->symfonyFinderMock $this->symfonyFinderMock
->method($fluentMethod) ->method($fluentMethod)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment