Skip to content

Commit 9fd3712

Browse files
committed
Fix broken CMS Block listing page for admin users with limited permissions
Add test coverage
1 parent 38d7aaa commit 9fd3712

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/DataProviderTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,24 @@ public function testPrepareMetadata(): void
167167
$this->dataProvider->prepareMetadata()
168168
);
169169
}
170+
171+
/**
172+
* @covers \Magento\Cms\Ui\Component\DataProvider::prepareMetadata
173+
*/
174+
public function testPrepareMetadataForCmsBlockListing(): void
175+
{
176+
$name = 'cms_block_listing_data_source';
177+
178+
$this->dataProvider = new DataProvider(
179+
$name,
180+
$this->primaryFieldName,
181+
$this->requestFieldName,
182+
$this->reportingMock,
183+
$this->searchCriteriaBuilderMock,
184+
$this->requestInterfaceMock,
185+
$this->filterBuilderMock
186+
);
187+
188+
$this->assertEquals([], $this->dataProvider->prepareMetadata());
189+
}
170190
}

0 commit comments

Comments
 (0)