/**
  * Wraps the given Descriptor inside a Collection Descriptor of type array and returns that.
  *
  * @param DescriptorAbstract $descriptor
  *
  * @return CollectionDescriptor
  */
 protected function convertToArrayDescriptor($descriptor)
 {
     $arrayDescriptor = new CollectionDescriptor('array');
     $arrayDescriptor->setTypes(array($descriptor));
     $arrayDescriptor->setKeyTypes(array('mixed'));
     return $arrayDescriptor;
 }
 /**
  * @covers phpDocumentor\Descriptor\Type\CollectionDescriptor::__toString
  */
 public function testRetrieveCollectionNotationFromObject()
 {
     $this->fixture->setKeyTypes(array(new StringDescriptor()));
     $this->fixture->setTypes(array(new FloatDescriptor(), new IntegerDescriptor()));
     $this->assertSame('array<string,float|integer>', (string) $this->fixture);
 }