public function testMatch()
{
$expectedConfigHash = array('template' => 'foo.html.twig', 'match' => array($this->getMatcherClass() => 456));
$matcherFactory = new $this->matcherFactoryClass($this->getRepositoryMock(), array('full' => array('not_matching' => array('template' => 'bar.html.twig', 'match' => array($this->getMatcherClass() => 123)), 'test' => $expectedConfigHash)));
$configHash = $matcherFactory->match($this->getMatchableValueObject());
$this->assertArrayHasKey('matcher', $configHash);
$this->assertInstanceOf(constant("{$this->matcherFactoryClass}::MATCHER_RELATIVE_NAMESPACE") . '\\' . $this->getMatcherClass(), $configHash['matcher']);
// Calling a 2nd time to check if the result has been properly cached in memory
$this->assertSame($configHash, $matcherFactory->match($this->getMatchableValueObject(), 'full'));
unset($configHash['matcher']);
$this->assertSame($expectedConfigHash, $configHash);
}