Converter\MappingConverterTest::convertMapsBasedOnOrder PHP Method

convertMapsBasedOnOrder() public method

    public function convertMapsBasedOnOrder()
    {
        $this->converter->addMapping(['foo'], ['bar']);
        $this->converter->addMapping(['qoo'], ['bar']);
        $result = $this->converter->convert(['foo' => 'foobar', 'qoo' => 'qoobar']);
        // If two mappings point to the same target, the second mapping will overwrite the first one.
        // The first one will be lost
        $this->assertCount(1, $result);
        $this->assertSame('qoobar', $result['bar']);
    }