public function testEncode(array $params, $expected)
{
$expected = str_replace('PHPBENCH_VERSION', PhpBench::VERSION, $expected);
$collection = $this->getSuiteCollection($params);
$xmlEncoder = new XmlEncoder();
$dom = $xmlEncoder->encode($collection);
$this->assertInstanceOf('PhpBench\\Dom\\Document', $dom);
$this->assertEquals($expected, $dom->dump());
}