Example #1
0
 /**
  * @dataProvider outputDataProvider
  */
 public function testProcessAndRetrieveContent($parameters, $expected)
 {
     $this->applicationFactory->getSettings()->set('smwgNamespacesWithSemanticLinks', $parameters['smwgNamespacesWithSemanticLinks']);
     $this->applicationFactory->getSettings()->set('smwgShowFactbox', $parameters['smwgShowFactbox']);
     $this->applicationFactory->registerObject('Store', $parameters['store']);
     $outputPage = $parameters['outputPage'];
     $instance = new FactboxCache($outputPage);
     $this->assertEmpty($instance->retrieveContent());
     $instance->process($parameters['parserOutput']);
     $result = $outputPage->mSMWFactboxText;
     $this->assertPreProcess($expected, $result, $outputPage, $instance);
     // Re-run on the same instance
     $instance->process($parameters['parserOutput']);
     $this->assertPostProcess($expected, $result, $outputPage, $instance);
 }