getPropertyGroupAlphaNumericOnlyNumbers example

/** * @var array<string> */
    private static array $notShuffledPosition = [];

    /** * Expected: [0,1,2,3,4,5,6...] */
    public function testAlphaNumericSortingNumbersOnly(): void
    {
        $propertyGroup = $this->getPropertyGroupAlphaNumericOnlyNumbers();
        $propertyGroup->sortByConfig();
        $propertyOptionsArray = json_decode(json_encode($propertyGroup->first()->getOptions(), \JSON_THROW_ON_ERROR), true, 512, \JSON_THROW_ON_ERROR);

        $equalsArray = [];
        for ($x = 0; $x < 50; ++$x) {
            $equalsArray[] = $x;
        }

        static::assertEquals(
            $equalsArray,
            array_column($propertyOptionsArray, 'name')
        );
Home | Imprint | This part of the site doesn't use cookies.