/** * Tests that the <b>setModifiers()</b> method throws an exception when an * invalid modifier or modifier combination was set. * * @param integer $modifiers Combinations of invalid modifiers. * * @return void * @covers PHP_Depend_Parser * @covers PHP_Depend_Builder_Default * @covers PHP_Depend_Code_ASTFieldDeclaration * @group pdepend * @group pdepend::ast * @group unittest * @dataProvider dataProviderSetModifiersThrowsExpectedExceptionForInvalidModifiers */ public function testSetModifiersThrowsExpectedExceptionForInvalidModifiers($modifiers) { $declaration = new PHP_Depend_Code_ASTFieldDeclaration(); $this->setExpectedException('InvalidArgumentException', 'Invalid field modifiers given, allowed modifiers are ' . 'IS_PUBLIC, IS_PROTECTED, IS_PRIVATE and IS_STATIC.'); $declaration->setModifiers($modifiers); }
/** * Returns the doc comment for this item or <b>null</b>. * * @return string */ public function getDocComment() { return $this->fieldDeclaration->getComment(); }