assertInstanceOf( PropertyTableDefinition::class, new PropertyTableDefinition( 'foo', 'bar' ) ); } public function testGetters() { $diType = SMWDataItem::TYPE_NUMBER; $name = 'smw_di_number'; $instance = new PropertyTableDefinition( $diType, $name ); $this->assertIsArray( $instance->getFields( StoreFactory::getStore( '\SMW\SQLStore\SQLStore' ) ) ); $this->assertEquals( $diType, $instance->getDiType() ); $this->assertEquals( $name, $instance->getName() ); } public function testIdSubject() { $instance = new PropertyTableDefinition( 'foo', 'bar' ); $instance->setUsesIdSubject( false ); $this->assertFalse( $instance->usesIdSubject() ); } public function testGetFixedProperty() { $instance = new PropertyTableDefinition( 'foo', 'bar' ); $this->expectException( 'OutOfBoundsException' ); $instance->getFixedProperty(); } public function testTableType() { $instance = new PropertyTableDefinition( 'foo', 'bar' ); $instance->setTableType( PropertyTableDefinition::TYPE_CORE ); $this->assertFalse( $instance->isTableType( PropertyTableDefinition::TYPE_CUSTOM ) ); } }