diff --git a/eZ/Publish/Core/Limitation/SiteAccessLimitationType.php b/eZ/Publish/Core/Limitation/SiteAccessLimitationType.php index 6a08644310..7c616a7b09 100644 --- a/eZ/Publish/Core/Limitation/SiteAccessLimitationType.php +++ b/eZ/Publish/Core/Limitation/SiteAccessLimitationType.php @@ -32,12 +32,8 @@ public function __construct( /** * Generates the SiteAccess value as CRC32. - * - * @param string $sa - * - * @return string */ - private function generateSiteAccessValue($sa) + public function generateSiteAccessValue(string $sa): string { return sprintf('%u', crc32($sa)); } diff --git a/eZ/Publish/Core/Limitation/Tests/SiteAccessLimitationTypeTest.php b/eZ/Publish/Core/Limitation/Tests/SiteAccessLimitationTypeTest.php index 4f6b152d39..30af420f04 100644 --- a/eZ/Publish/Core/Limitation/Tests/SiteAccessLimitationTypeTest.php +++ b/eZ/Publish/Core/Limitation/Tests/SiteAccessLimitationTypeTest.php @@ -297,4 +297,14 @@ public function testValueSchema(SiteAccessLimitationType $limitationType) { self::markTestSkipped('Method valueSchema() is not implemented'); } + + /** + * @depends testConstruct + */ + public function testGenerateSiteAccessValue(SiteAccessLimitationType $limitationType): void + { + self::assertSame('341347141', $limitationType->generateSiteAccessValue('ger')); + self::assertSame('2582995467', $limitationType->generateSiteAccessValue('eng')); + self::assertSame('1817462202', $limitationType->generateSiteAccessValue('behat_site')); + } }