testEnvironment->addConfiguration( 'smwgImportReqVersion', 1 ); $this->testEnvironment->addConfiguration( 'smwgEnabledFulltextSearch', false ); $this->runnerFactory = $this->testEnvironment::getUtilityFactory()->newRunnerFactory(); $this->spyMessageReporter = $this->testEnvironment::getUtilityFactory()->newSpyMessageReporter(); } protected function tearDown(): void { parent::tearDown(); } public function testRun() { $maintenanceRunner = $this->runnerFactory->newMaintenanceRunner( '\SMW\Maintenance\disposeOutdatedEntities' ); $maintenanceRunner->setMessageReporter( $this->spyMessageReporter ); $this->assertTrue( $maintenanceRunner->run() ); $this->assertContains( 'Removing outdated and invalid entities', $this->spyMessageReporter->getMessagesAsString() ); $this->assertContains( 'Removing query links', $this->spyMessageReporter->getMessagesAsString() ); } }