public function MagicMethods() { $this->assertInstanceOf('phpDocumentor\\Descriptor\\Collection', $this->fixture->getMagicMethods()); $tagCollection = m::mock('phpDocumentor\\Descriptor\\Collection'); $tagCollection->shouldReceive('get')->with('method')->andReturn(new Collection()); $mock = m::mock('ClassDescriptor'); $mock->shouldDeferMissing(); $mock->shouldReceive('getTags')->andReturn($tagCollection); $this->fixture->setTags(new Collection(array('tags'))); }