SalutationSorter example

$test->setId(Uuid::randomHex());
        $test->setSalutationKey('test');

        $salutations = new SalutationCollection();
        $salutations->add($mr);
        $salutations->add($mrs);
        $salutations->add($notSpecified);
        $salutations->add($test);

        static::assertSame($salutations->first()$mr);

        $sorter = new SalutationSorter();
        $salutations = $sorter->sort($salutations);

        static::assertSame($salutations->first()$notSpecified);
    }
}
Home | Imprint | This part of the site doesn't use cookies.