Skip to content

Commit 74b3e62

Browse files
committed
Rename stub methods and add missing doc blocks.
1 parent ae11a0c commit 74b3e62

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

app/code/Magento/Cms/Test/Unit/Block/BlockByIdentifierTest.php

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ public function testBlockCacheIdentitiesContainExplicitScopeInformation(): void
127127
$identities = $block->getIdentities();
128128

129129
// Then
130-
$this->assertContains($this->getCacheKeyStubById(self::STUB_CMS_BLOCK_ID), $identities);
130+
$this->assertContains($this->getIdentityStubById(self::STUB_CMS_BLOCK_ID), $identities);
131131
$this->assertContains(
132-
$this->getCacheKeyStubByIdentifier(self::STUB_EXISTING_IDENTIFIER, self::STUB_DEFAULT_STORE),
132+
$this->getIdentityStubByIdentifier(self::STUB_EXISTING_IDENTIFIER, self::STUB_DEFAULT_STORE),
133133
$identities
134134
);
135135
}
@@ -195,12 +195,25 @@ private function getPassthroughFilterMock(): Template
195195
return $filterMock;
196196
}
197197

198-
private function getCacheKeyStubByIdentifier(string $identifier, int $storeId = self::STUB_DEFAULT_STORE): string
198+
/**
199+
* Returns stub of Identity based on `$identifier` and `$storeId`
200+
*
201+
* @param string $identifier
202+
* @param int $storeId
203+
* @return string
204+
*/
205+
private function getIdentityStubByIdentifier(string $identifier, int $storeId = self::STUB_DEFAULT_STORE): string
199206
{
200207
return BlockByIdentifier::CACHE_KEY_PREFIX . '_' . $identifier . '_' . $storeId;
201208
}
202209

203-
private function getCacheKeyStubById(int $cmsBlockId): string
210+
/**
211+
* Returns stub of Identity based on `$cmsBlockId`
212+
*
213+
* @param int $cmsBlockId
214+
* @return string
215+
*/
216+
private function getIdentityStubById(int $cmsBlockId): string
204217
{
205218
return BlockByIdentifier::CACHE_KEY_PREFIX . '_' . $cmsBlockId;
206219
}

0 commit comments

Comments
 (0)