public function testReportMessage()
 {
     $tableSchemaManager = $this->getMockBuilder('\\SMW\\SQLStore\\TableSchemaManager')->disableOriginalConstructor()->getMock();
     $tableBuilder = $this->getMockBuilder('\\SMW\\SQLStore\\TableBuilder')->disableOriginalConstructor()->getMock();
     $tableIntegrityExaminer = $this->getMockBuilder('\\SMW\\SQLStore\\TableIntegrityExaminer')->disableOriginalConstructor()->getMock();
     $instance = new Installer($tableSchemaManager, $tableBuilder, $tableIntegrityExaminer);
     $callback = function () use($instance) {
         $instance->reportMessage('Foo');
     };
     $this->assertEquals('Foo', $this->testEnvironment->executeAndFetchOutputBufferContents($callback));
 }
 /**
  * @since 2.5
  *
  * @return Installer
  */
 public function newInstaller()
 {
     $messageReporter = MessageReporterFactory::getInstance()->newNullMessageReporter();
     $options = $this->store->getOptions();
     $tableBuilder = TableBuilder::factory($this->store->getConnection(DB_MASTER));
     $tableBuilder->setMessageReporter($messageReporter);
     $tableIntegrityExaminer = new TableIntegrityExaminer($this->store);
     $tableSchemaManager = new TableSchemaManager($this->store);
     $installer = new Installer($tableSchemaManager, $tableBuilder, $tableIntegrityExaminer);
     if ($options->has(Installer::OPT_MESSAGEREPORTER)) {
         $installer->setMessageReporter($options->get(Installer::OPT_MESSAGEREPORTER));
     }
     $installer->isFromExtensionSchemaUpdate($options->has('isFromExtensionSchemaUpdate') ? $options->get('isFromExtensionSchemaUpdate') : false);
     return $installer;
 }