dataItemFactory = new DataItemFactory(); $this->testEnvironment = new TestEnvironment(); $this->testEnvironment->resetPoolCacheById( \SMWExporter::POOLCACHE_ID ); } protected function tearDown(): void { $this->testEnvironment->tearDown(); parent::tearDown(); } public function testCanConstruct() { $this->assertInstanceof( PropertyValueResourceBuilder::class, new PropertyValueResourceBuilder() ); } public function testAddResourceValue() { $property = $this->dataItemFactory->newDIProperty( 'Foo' ); $dataItem = $this->dataItemFactory->newDIWikiPage( 'Bar', NS_MAIN ); $expData = new ExpData( new ExpNsResource( 'Foobar', 'Bar', 'Mo', null ) ); $instance = new PropertyValueResourceBuilder(); $instance->addResourceValue( $expData, $property, $dataItem ); $this->assertTrue( $instance->isResourceBuilderFor( $property ) ); } }