/**
* A test for argument swapping.
*/
public function testArgumentSwappingOrder()
{
$message = '%3$swap %2$swap %1$swap';
$formatter = $this->createMock(FormatterInterface::class);
$formatter->expects($this->atLeastOnce())->method('has')->with('swap')->willReturn(true);
$formatter->expects($this->atLeastOnce())->method('formatValue')->with('swap', \PHPUnit_Framework_Assert::anything())->willReturnOnConsecutiveCalls('value3', 'value2', 'value1');
$intlFormat = new IntlFormat([$formatter]);
$expected = 'value3 value2 value1';
$this->assertSame($expected, $intlFormat->format($message, 'value1', 'value2', 'value3'));
}