59 lines
1.1 KiB
PHP
59 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace SMW\Tests\Integration\Maintenance;
|
|
|
|
use SMW\Tests\PHPUnitCompat;
|
|
use SMW\Tests\SMWIntegrationTestCase;
|
|
use SMW\Tests\TestEnvironment;
|
|
|
|
/**
|
|
* @group semantic-mediawiki
|
|
* @group Database
|
|
* @group medium
|
|
*
|
|
* @license GPL-2.0-or-later
|
|
* @since 3.2
|
|
*
|
|
* @author mwjames
|
|
*/
|
|
class DumpRDFTest extends SMWIntegrationTestCase {
|
|
|
|
use PHPUnitCompat;
|
|
|
|
private $runnerFactory;
|
|
private $spyMessageReporter;
|
|
|
|
protected function setUp(): void {
|
|
parent::setUp();
|
|
|
|
$this->runnerFactory = TestEnvironment::getUtilityFactory()->newRunnerFactory();
|
|
$this->spyMessageReporter = $this->testEnvironment::getUtilityFactory()->newSpyMessageReporter();
|
|
}
|
|
|
|
protected function tearDown(): void {
|
|
parent::tearDown();
|
|
}
|
|
|
|
public function testRun() {
|
|
$maintenanceRunner = $this->runnerFactory->newMaintenanceRunner(
|
|
'\SMW\Maintenance\dumpRDF'
|
|
);
|
|
|
|
$maintenanceRunner->setMessageReporter(
|
|
$this->spyMessageReporter
|
|
);
|
|
|
|
$maintenanceRunner->setQuiet();
|
|
|
|
$this->assertTrue(
|
|
$maintenanceRunner->run()
|
|
);
|
|
|
|
$this->assertContains(
|
|
'writting OWL/RDF information',
|
|
$this->spyMessageReporter->getMessagesAsString()
|
|
);
|
|
}
|
|
|
|
}
|