/**
* @covers phpDocumentor\Descriptor\TraitDescriptor::getMagicMethods
*/
public function testMagicMethodsReturnsExpectedCollectionWithTags()
{
$mockMethodDescriptor = m::mock('phpDocumentor\\Descriptor\\Tag\\MethodDescriptor');
$mockMethodDescriptor->shouldReceive('getMethodName')->andReturn('Sample');
$mockMethodDescriptor->shouldReceive('getDescription')->andReturn('Sample description');
$methodCollection = new Collection(array($mockMethodDescriptor));
$this->fixture->getTags()->set('method', $methodCollection);
$magicMethodsCollection = $this->fixture->getMagicMethods();
$this->assertInstanceOf('phpDocumentor\\Descriptor\\Collection', $magicMethodsCollection);
$this->assertSame(1, $magicMethodsCollection->count());
$this->assertSame('Sample', $magicMethodsCollection[0]->getName());
$this->assertSame('Sample description', $magicMethodsCollection[0]->getDescription());
$this->assertSame($this->fixture, $magicMethodsCollection[0]->getParent());
}