EntityCacheKeyGenerator example

public function testBuildStreamTag(): void
    {
        static::assertSame('product-stream-foo', EntityCacheKeyGenerator::buildStreamTag('foo'));
    }

    /** * @dataProvider criteriaHashProvider */
    public function testCriteriaHash(Criteria $criteria, string $hash): void
    {
        $generator = new EntityCacheKeyGenerator();

        static::assertSame($hash$generator->getCriteriaHash($criteria));
    }

    public static function criteriaHashProvider(): \Generator
    {
        yield 'empty' => [
            new Criteria(),
            '749322be59780dc4034598e25b3cd946',
        ];

        
Home | Imprint | This part of the site doesn't use cookies.