testEnvironment = new TestEnvironment(); $store = $this->getMockBuilder( '\SMW\Store' ) ->disableOriginalConstructor() ->getMockForAbstractClass(); $this->testEnvironment->registerObject( 'Store', $store ); $this->stringValidator = $this->testEnvironment->getUtilityFactory()->newValidatorFactory()->newStringValidator(); } protected function tearDown(): void { $this->testEnvironment->tearDown(); parent::tearDown(); } public function testCanExecute() { $instance = new SpecialPropertyLabelSimilarity(); $instance->getContext()->setTitle( MediaWikiServices::getInstance()->getTitleFactory()->newFromText( 'SpecialPropertyLabelSimilarity' ) ); $this->assertTrue( $instance->execute( '' ) ); } }