/** * Test's the merge() method with two properties instances containing the same key * and the override flag has been passed. * * @return void */ public function testMergePropertiesWithSameKeyAndOverride() { // initialize the properties $properties = new Properties(); $properties->setProperty('foo', '${bar}'); // initialize the properties to be merged $propertiesToMerge = new Properties(); $propertiesToMerge->setProperty('foo', 'bar'); // merge the properties $properties->mergeProperties($propertiesToMerge, true); // assert that the results are as expected $this->assertSame('bar', $properties->getProperty('foo')); }