Skip to content

Commit b88fc33

Browse files
committed
Merge branch 'MAGETWO-98665' of https://github.com/magento-tango/magento2ce into pr_2019_03_20
2 parents c1c7a38 + cb9d675 commit b88fc33

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ public function getDirsCollection($path)
270270
$collection = $this->getCollection($path)
271271
->setCollectDirs(true)
272272
->setCollectFiles(false)
273-
->setCollectRecursively(false);
273+
->setCollectRecursively(false)
274+
->setOrder('basename', \Magento\Framework\Data\Collection\Filesystem::SORT_ORDER_ASC);
274275

275276
$conditions = $this->getConditionsForExcludeDirs();
276277

app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,10 @@ protected function generalTestGetDirsCollection($path, $collectionArray = [], $e
417417
->method('setCollectRecursively')
418418
->with(false)
419419
->willReturnSelf();
420+
$storageCollectionMock->expects($this->once())
421+
->method('setOrder')
422+
->with('basename', \Magento\Framework\Data\Collection\Filesystem::SORT_ORDER_ASC)
423+
->willReturnSelf();
420424
$storageCollectionMock->expects($this->once())
421425
->method('getIterator')
422426
->willReturn(new \ArrayIterator($collectionArray));

0 commit comments

Comments
 (0)