@trigger_error(__NAMESPACE__.'\DrupalTranslator::transChoice() is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use DrupalTranslator::trans() instead. See https://www.drupal.org/node/3255250',E_USER_DEPRECATED);
// Violation messages can separated singular and plural versions by "|".
$this->expectDeprecation('Drupal\Core\Validation\DrupalTranslator::transChoice() is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use DrupalTranslator::trans() instead. See https://www.drupal.org/node/3255250');
$translator=newDrupalTranslator();
$this->assertInstanceOf(
PluralTranslatableMarkup::class,
$translator->transChoice('There is one apple | There are @count apples',1)