<NME> AbstractMemberGeneratorTest.php
<BEF> <?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace ZendTest\Code\Generator;

use Zend\Code\Generator\AbstractMemberGenerator;

class AbstractMemberGeneratorTest extends \PHPUnit_Framework_TestCase
{
class AbstractMemberGeneratorTest extends TestCase
{
    /**
     * @var AbstractMemberGenerator
     */
    private $fixture;

    protected function setUp() : void
    {
        $this->fixture = $this->getMockForAbstractClass(AbstractMemberGenerator::class);
    }

    public function testSetFlagsWithArray()
    {
        $this->fixture->setFlags(
            [
                AbstractMemberGenerator::FLAG_FINAL,
                AbstractMemberGenerator::FLAG_PUBLIC,
            ]
        );
        $this->assertEquals(true, $this->fixture->isFinal());
    }

}
    public function testRemoveDocBlock(): void
    {
        $this->fixture->setDocBlock(new DocBlockGenerator());

        $this->fixture->removeDocBlock();

        $this->assertNull($this->fixture->getDocBlock());
    }

    public function testRemoveDocBlockIsIdempotent(): void
    {
        $this->fixture->removeDocBlock();
        $this->fixture->removeDocBlock();

        $this->assertNull($this->fixture->getDocBlock());
    }
}

<MSG> add testcase for setDocblock

<DFF> @@ -10,6 +10,7 @@
 namespace ZendTest\Code\Generator;
 
 use Zend\Code\Generator\AbstractMemberGenerator;
+use Zend\Code\Generator\Exception\InvalidArgumentException;
 
 class AbstractMemberGeneratorTest extends \PHPUnit_Framework_TestCase
 {
@@ -36,4 +37,11 @@ class AbstractMemberGeneratorTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals(true, $this->fixture->isFinal());
     }
 
+    /**
+     * @expectedException InvalidArgumentException
+     */
+    public function testSetDocBlockThrowsExceptionWithInvalidType()
+    {
+        $this->fixture->setDocBlock(new \stdClass());
+    }
 }
\ No newline at end of file

add testcase for setDocblock