/**
* @dataProvider data_provider
* @param array $questionsAndAnswers
* @param string $xpath
* @param int $expectedCount
*/
public function test_factory_question(array $questionsAndAnswers, $xpath, $expectedCount)
{
foreach ($questionsAndAnswers as $question => $answer) {
$this->mock_question_helper($question, $answer);
}
$xml = $this->call_create_on_sut();
$fluidXml = FluidXml::load($xml);
$results = $fluidXml->query($xpath);
self::assertCount($expectedCount, $results);
}