/** * testIsPublicByDefaultReturnsFalse * * @return void */ public function testIsPublicByDefaultReturnsFalse() { $method = new PHP_Depend_Code_Method('method'); self::assertFalse($method->isPublic()); }
/** * Tests that the {@link PHP_Depend_Code_Method::setModifiers()} method * ignores repeated calls if the internal value is set. * * @return void * @group pdepend * @group pdepend::code * @group unittest */ public function testSetModifiersOnlyAcceptsTheFirstValue() { $method = new PHP_Depend_Code_Method('method'); $method->setModifiers(PHP_Depend_ConstantsI::IS_PUBLIC); $method->setModifiers(PHP_Depend_ConstantsI::IS_PROTECTED); self::assertTrue($method->isPublic()); }