/** * testGetModifiersReturnsInjectedModifierValue * * @return void */ public function testGetModifiersReturnsInjectedModifierValue() { $class = new PHP_Depend_Code_Class(__CLASS__); $class->setModifiers(PHP_Depend_ConstantsI::IS_FINAL); self::assertSame(PHP_Depend_ConstantsI::IS_FINAL, $class->getModifiers()); }
/** * Tests that it is not possible to overwrite previously set class modifiers. * * @return void * @covers PHP_Depend_Code_AbstractClassOrInterface * @covers PHP_Depend_Code_Class * @group pdepend * @group pdepend::code * @group unittest * @expectedException BadMethodCallException */ public function testSetModifiersThrowsExpectedExceptionOnOverwrite() { $class = new PHP_Depend_Code_Class('FooBar'); $class->setModifiers(PHP_Depend_ConstantsI::IS_FINAL); $class->setModifiers(PHP_Depend_ConstantsI::IS_FINAL); }