public function testSortSecondaryKeysWithOrder()
 {
     $this->map->set('b', 'foo', 'value1');
     $this->map->set('b', 'bar', 'value2');
     $this->map->set('b', 'baz', 'value3');
     $this->map->set('a', 'bam', 'value4');
     $this->map->sortSecondaryKeys('b', array('baz', 'foo', 'bar', 'bam'));
     $this->assertSame(array('b' => array('baz' => 'value3', 'foo' => 'value1', 'bar' => 'value2'), 'a' => array('bam' => 'value4')), $this->map->toArray());
 }
 /**
  * Adds a type descriptor.
  *
  * @param BindingTypeDescriptor $typeDescriptor The type descriptor.
  */
 public function add(BindingTypeDescriptor $typeDescriptor)
 {
     $this->map->set($typeDescriptor->getName(), $typeDescriptor->getContainingPackage()->getName(), $typeDescriptor);
 }
 /**
  * Sets a path mapping for a specific repository path.
  *
  * @param string      $repositoryPath The repository path.
  * @param PathMapping $mapping        The path mapping.
  */
 public function set($repositoryPath, PathMapping $mapping)
 {
     $this->map->set($repositoryPath, $mapping->getContainingModule()->getName(), $mapping);
     $this->primaryKeysSorted = false;
 }