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( ConceptPropertyValueResourceBuilder::class, new ConceptPropertyValueResourceBuilder() ); } public function testIsNotResourceBuilderForNonConcProperty() { $property = $this->dataItemFactory->newDIProperty( 'Foo' ); $instance = new ConceptPropertyValueResourceBuilder(); $this->assertFalse( $instance->isResourceBuilderFor( $property ) ); } public function testAddResourceValueForConcProperty() { $property = $this->dataItemFactory->newDIProperty( '_CONC' ); $dataItem = $this->dataItemFactory->newDIConcept( 'Foo' ); $expData = new ExpData( new ExpNsResource( 'Foobar', 'Bar', 'Mo', null ) ); $instance = new ConceptPropertyValueResourceBuilder(); $instance->addResourceValue( $expData, $property, $dataItem ); $this->assertTrue( $instance->isResourceBuilderFor( $property ) ); } }