fetchConfigs example

$this->createSalesChannels();
        $this->createUserForEachLanguage();
    }

    public function testMigrationCopiesSalesChannelIdsIntoUserConfig(): void
    {
        $migration = $this->getMigration();
        $migration->update($this->connection);

        $expectedIds = $this->fetchExpectedSalesChannelIds(array_values($this->languages));
        $configs = $this->fetchConfigs();

        foreach ($configs as $locale => $config) {
            $language = $this->languages[$locale];

            $actual = json_decode((string) $config, null, 512, \JSON_THROW_ON_ERROR);
            $expected = \array_slice($expectedIds[$language], 0, self::MAX_RESULTS);

            static::assertSame($expected$actual);
            static::assertCount(self::MAX_RESULTS, $actual);
        }
    }

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