// Get new instance
$producerInstance = new CruncherTestUnitProducer();
- // Initialize this producer
- $producerInstance->initProducer();
-
// Return the prepared instance
return $producerInstance;
}
/**
- * Produces some work/test units and pushes them onto the queue
+ * Initializes the producer. This method satisfies the abstract BaseProducer
+ * class.
*
* @return void
- * @todo 0% done
*/
- public function produceUnits () {
- $this->partialStub('Please implement this method.');
+ protected function initProducer () {
+ // Get a XML template instance
+ $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('cruncher_test_unit_producer_template_class');
+
+ // Load the template
+ $templateInstance->loadCruncherTestUnitTemplate('test_unit');
+
+ // Render the XML content
+ $templateInstance->renderXmlContent();
+
+ // And set it in this cruncher
+ $this->setTemplateInstance($templateInstance);
}
/**
- * Initializes the producer
+ * Produces some work/test units and pushes them onto the queue
*
* @return void
+ * @todo 0% done
*/
- private function initProducer () {
+ public function produceUnits () {
+ $this->partialStub('Please implement this method.');
}
}