setConfigurationSourceHint() public method

Sets some information (hint) about where this configuration has been created.
public setConfigurationSourceHint ( string $hint ) : void
$hint string The hint - e.g. the filename of the configuration file
return void
コード例 #1
0
 /**
  * @test
  */
 public function propertiesOfTypeObjectCanSpecifyAdditionalObjectConfigurationOptions()
 {
     $configurationArray = [];
     $configurationArray['properties']['theProperty']['object']['name'] = 'Foo';
     $configurationArray['properties']['theProperty']['object']['className'] = __CLASS__;
     $propertyObjectConfiguration = new Configuration('Foo', __CLASS__);
     $propertyObjectConfiguration->setConfigurationSourceHint(__CLASS__ . ', property "theProperty"');
     $objectConfiguration = new Configuration('TestObject', 'TestObject');
     $objectConfiguration->setProperty(new ConfigurationProperty('theProperty', $propertyObjectConfiguration, ConfigurationProperty::PROPERTY_TYPES_OBJECT));
     $configurationBuilder = $this->getAccessibleMock(ConfigurationBuilder::class, ['dummy']);
     $builtObjectConfiguration = $configurationBuilder->_call('parseConfigurationArray', 'TestObject', $configurationArray, __CLASS__);
     $this->assertEquals($objectConfiguration, $builtObjectConfiguration);
 }